Skip to content

Commit

Permalink
Upgrade yaml.v3 indirect dependencies and Dockerfile to golang:1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
gl-johnson committed Jan 26, 2023
1 parent 5da6569 commit 4aadb42
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 30 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
[<account>:]<kind>:<identifier>.
[cyberark/conjur-api-go#153](https://github.com/cyberark/conjur-api-go/pull/153)

### Security
- Upgrade gopkg.in/yaml.v3 indirect dependencies to v3.0.1 and Dockerfile to golang:1.19.5
[cyberark/conjur-api-go#158](https://github.com/cyberark/conjur-api-go/pull/158)

## [0.10.2] - 2022-11-14

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To run the tests against a specific version of Golang, you can run the following
This will spin up a containerized Conjur environment and build the test containers,
and will run the tests in a `golang:1.17` container

Supported arguments are `1.17` and `1.18`, with the
Supported arguments are `1.17`, `1.18`, and `1.19`, with the
default being `1.17` if no argument is given.

### Setting up a development environment
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG FROM_IMAGE="golang:1.17"
ARG FROM_IMAGE="golang:1.19"
FROM ${FROM_IMAGE}
MAINTAINER Conjur Inc.

Expand Down
58 changes: 34 additions & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,42 @@ pipeline {
}
}
}
stage('Run Tests') {
parallel {
stage('Run tests: Golang 1.19') {
steps {
sh './bin/test.sh 1.19'
junit 'output/1.19/junit.xml'
}
}

stage('Run tests: Golang 1.18') {
steps {
sh './bin/test.sh 1.18'
junit 'output/1.18/junit.xml'
}
}
stage('Run tests: Golang 1.18') {
steps {
sh './bin/test.sh 1.18'
junit 'output/1.18/junit.xml'
}
}

stage('Run tests: Golang 1.17') {
steps {
sh './bin/test.sh 1.17'
junit 'output/1.17/junit.xml'
cobertura autoUpdateHealth: false,
autoUpdateStability: false,
coberturaReportFile: 'output/1.17/coverage.xml',
conditionalCoverageTargets: '30, 0, 0',
failUnhealthy: true,
failUnstable: false,
lineCoverageTargets: '30, 0, 0',
maxNumberOfBuilds: 0,
methodCoverageTargets: '30, 0, 0',
onlyStable: false,
sourceEncoding: 'ASCII',
zoomCoverageChart: false
sh 'cp output/1.17/c.out .'
ccCoverage("gocov", "--prefix github.com/cyberark/conjur-api-go")
stage('Run tests: Golang 1.17') {
steps {
sh './bin/test.sh 1.17'
junit 'output/1.17/junit.xml'
cobertura autoUpdateHealth: false,
autoUpdateStability: false,
coberturaReportFile: 'output/1.17/coverage.xml',
conditionalCoverageTargets: '30, 0, 0',
failUnhealthy: true,
failUnstable: false,
lineCoverageTargets: '30, 0, 0',
maxNumberOfBuilds: 0,
methodCoverageTargets: '30, 0, 0',
onlyStable: false,
sourceEncoding: 'ASCII',
zoomCoverageChart: false
sh 'cp output/1.17/c.out .'
ccCoverage("gocov", "--prefix github.com/cyberark/conjur-api-go")
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ failed() {
exit 1
}

# Golang container version to use: `1.17` or `1.18`
# Golang container version to use: `1.17`, `1.18`, or `1.19`
announce "Running tests for Go version: $GO_VERSION...";
docker-compose run \
-e CONJUR_AUTHN_API_KEY \
Expand Down
21 changes: 20 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,30 @@ services:
CONJUR_AUTHN_API_KEY:
GO_VERSION:

test-1.19:
build:
context: .
args:
FROM_IMAGE: "golang:1.19"
ports:
- 8080
depends_on:
- conjur
volumes:
- ./output:/conjur-api-go/output
environment:
CONJUR_DATA_KEY:
CONJUR_APPLIANCE_URL: http://conjur
CONJUR_ACCOUNT: cucumber
CONJUR_AUTHN_LOGIN: admin
CONJUR_AUTHN_API_KEY:
GO_VERSION:

dev:
build:
context: .
args:
FROM_IMAGE: "golang:1.17"
FROM_IMAGE: "golang:1.19"
ports:
- 8080
depends_on:
Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module github.com/cyberark/conjur-api-go

go 1.17

require (
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
github.com/sirupsen/logrus v1.8.1
Expand All @@ -21,4 +23,5 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

go 1.17
replace gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c => gopkg.in/yaml.v3 v3.0.1

1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLF
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 4aadb42

Please sign in to comment.