From 5effb1d0f2c0e52b5f5e34a422c0b442f434cd92 Mon Sep 17 00:00:00 2001 From: Geri Jennings Date: Mon, 13 May 2019 14:35:00 -0400 Subject: [PATCH 1/3] Bump go version to 1.12 Also, remove local dependency on mitchellh/go-homedir in favor of native os method --- CHANGELOG.md | 2 ++ CONTRIBUTING.md | 4 ++-- conjur-env/Dockerfile | 2 +- conjur-env/go.mod | 3 +-- conjur-env/go.sum | 9 ++++++--- conjur-env/temp_factory.go | 3 +-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd740d6..6a561f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Buildpack now copies the secrets retrieval profile script into the application directory. This works around a missing feature in the Java buildpack, where it does not correctly source from the buildpacks profile directories. +- Go version of conjur-env binary bumped to 1.12 +- Go binary updated to use native os homedir method instead of mitchellh lib ## [2.0.1] - 2019-03-19 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2f1602a..7556735 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ Before getting started, you should install some developer tools. These are not r In addition, if you will be making changes to the `conjur-env` binary, you should ensure you have [Go installed](https://golang.org/doc/install#install) locally. -Our project uses Go modules, so you will want to install version 1.11+. +Our project uses Go modules, so you will want to install version 1.12+. ### Pull Request Workflow @@ -39,7 +39,7 @@ Make sure your Pull Request includes an update to the [CHANGELOG](https://github ### Updating the `conjur-env` Binary -The `conjur-env` binary uses Go modules to manage dependencies. To update the versions of `summon` / `conjur-api-go` that are included in the `conjur-env` binary in the buildpack, make sure you have Go installed locally (at least version 1.11) and run: +The `conjur-env` binary uses Go modules to manage dependencies. To update the versions of `summon` / `conjur-api-go` that are included in the `conjur-env` binary in the buildpack, make sure you have Go installed locally (at least version 1.12) and run: ``` $ cd conjur-env/ diff --git a/conjur-env/Dockerfile b/conjur-env/Dockerfile index e120115..30c66ec 100644 --- a/conjur-env/Dockerfile +++ b/conjur-env/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.11-stretch +FROM golang:1.12-stretch MAINTAINER CyberArk Software, Inc. ENV GOOS=linux \ diff --git a/conjur-env/go.mod b/conjur-env/go.mod index 10ee8ff..20aeffb 100644 --- a/conjur-env/go.mod +++ b/conjur-env/go.mod @@ -2,10 +2,9 @@ module github.com/cyberark/cloudfoundry-conjur-buildpack/conjur-env require ( github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d - github.com/cyberark/conjur-api-go v0.5.2 + github.com/cyberark/conjur-api-go v0.6.0 github.com/cyberark/summon v0.6.10 github.com/konsorten/go-windows-terminal-sequences v1.0.1 - github.com/mitchellh/go-homedir v1.1.0 github.com/sirupsen/logrus v1.3.0 golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a diff --git a/conjur-env/go.sum b/conjur-env/go.sum index 8482ce1..2a85241 100644 --- a/conjur-env/go.sum +++ b/conjur-env/go.sum @@ -3,30 +3,33 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/codegangsta/cli v1.20.0/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA= github.com/cyberark/conjur-api-go v0.5.2 h1:8ntk07YNRz5bBwjNXkDEAPR70Yr+J2MN8NGlkhaMC3k= github.com/cyberark/conjur-api-go v0.5.2/go.mod h1:hwaReWirzgKor+JtH6vbwZaASDXulvd0SzGCloC5uOc= +github.com/cyberark/conjur-api-go v0.6.0 h1:QQYmFRhcCvmtZ9oSRoXCxWb7uRjppfu5lcEwo4HEjtg= +github.com/cyberark/conjur-api-go v0.6.0/go.mod h1:uM96pLpckwYYAWRSbrsw+TT0y3kg49QCEGpdpa9dJ34= github.com/cyberark/summon v0.6.10 h1:uDauDW3KbBIDKisAWZgJMYN0nCY/AIwxzOlYF4mmpeo= github.com/cyberark/summon v0.6.10/go.mod h1:s/W85ZNiiKx+UwYNvOM+dOMGK9JCp1r36aqZ69P4SsU= github.com/cyberark/summon v0.6.11 h1:z0jw3jlDMNdeLgDN0+jr6km1vpv21Wa+mTGeojq0t34= github.com/cyberark/summon v0.6.11/go.mod h1:s/W85ZNiiKx+UwYNvOM+dOMGK9JCp1r36aqZ69P4SsU= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/gopherjs/gopherjs v0.0.0-20180202210947-296de816d4fe/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/jtolds/gls v4.2.2-0.20181110203027-b4936e06046b+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/smartystreets/assertions v0.0.0-20170925172151-0b37b35ec743/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v0.0.0-20190215210624-980c5ac6f3ac/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20170602164621-9e8dc3f972df/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= +github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/conjur-env/temp_factory.go b/conjur-env/temp_factory.go index 3931a2b..68f909d 100644 --- a/conjur-env/temp_factory.go +++ b/conjur-env/temp_factory.go @@ -1,7 +1,6 @@ package main import ( - "github.com/mitchellh/go-homedir" "io/ioutil" "os" "strings" @@ -31,7 +30,7 @@ func DefaultTempPath() string { if err == nil && fi.Mode().IsDir() { return DEVSHM } - home, err := homedir.Dir() + home, err := os.UserHomeDir() if err == nil { dir, _ := ioutil.TempDir(home, ".tmp") return dir From 70ae58a9a3d82322f3aacc51e3bf6c7ba3819552 Mon Sep 17 00:00:00 2001 From: Geri Jennings Date: Mon, 13 May 2019 14:41:41 -0400 Subject: [PATCH 2/3] Add docker-compose name space to test runs There were some collisions with multiple versions of this test running, but they were resolved when each run was given a unique COMPOSE_PROJECT_NAME --- test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test.sh b/test.sh index 39488fa..4c9ddf2 100755 --- a/test.sh +++ b/test.sh @@ -7,6 +7,10 @@ function finish { } trap finish EXIT +# set up the containers to run in their own namespace +COMPOSE_PROJECT_NAME="$(basename "$PWD")_$(openssl rand -hex 3)" +export COMPOSE_PROJECT_NAME + # sets up conjur and retrieves credentials . ./setup-conjur.sh From bdee39cf1414d42c03d7ebadf8189cb863a58866 Mon Sep 17 00:00:00 2001 From: Geri Jennings Date: Mon, 13 May 2019 14:38:09 -0400 Subject: [PATCH 3/3] Bump version to 2.1.0 --- CHANGELOG.md | 5 ++++- VERSION | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a561f9..9595f6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [2.1.0] - 2019-05-13 + ### Added - Buildpack now searches for `secrets.yml` in `BOOT-INF/classes/` to better support Java applications by default. @@ -51,7 +53,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. The first tagged version. -[Unreleased]: https://github.com/cyberark/cloudfoundry-conjur-buildpack/compare/v2.0.1...HEAD +[Unreleased]: https://github.com/cyberark/cloudfoundry-conjur-buildpack/compare/v2.1.0...HEAD +[2.1.0]: https://github.com/cyberark/cloudfoundry-conjur-buildpack/compare/v2.0.1...v2.1.0 [2.0.1]: https://github.com/cyberark/cloudfoundry-conjur-buildpack/compare/v2.0.0...v2.0.1 [2.0.0]: https://github.com/cyberark/cloudfoundry-conjur-buildpack/compare/v1.0.0...v2.0.0 [1.0.0]: https://github.com/cyberark/cloudfoundry-conjur-buildpack/compare/v0.3.0...v1.0.0 diff --git a/VERSION b/VERSION index 38f77a6..7ec1d6d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.1 +2.1.0