Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade yaml.v3 indirect dependency and Dockerfile to golang:1.19.5 #158

Merged
merged 2 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ and will run all tests.

To run the tests against a specific version of Golang, you can run the following:
```shell
./bin/test.sh 1.17
./bin/test.sh 1.18
```

This will spin up a containerized Conjur environment and build the test containers,
and will run the tests in a `golang:1.17` container
and will run the tests in a `golang:1.18` container

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

### Setting up a development environment
To start a container with terminal access, and the necessary
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
53 changes: 28 additions & 25 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,35 @@ pipeline {
}
}
}
stage('Run Tests') {
parallel {
stage('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.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('Golang 1.18') {
steps {
sh './bin/test.sh 1.18'
junit 'output/1.18/junit.xml'
cobertura autoUpdateHealth: false,
autoUpdateStability: false,
coberturaReportFile: 'output/1.18/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.18/c.out .'
ccCoverage("gocov", "--prefix github.com/cyberark/conjur-api-go")
}
}
}
}

Expand Down
28 changes: 28 additions & 0 deletions NOTICES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ SECTION 2: MIT License
>>> github.com/stretchr/testify-v1.7.0
https://github.com/stretchr/testify/blob/v1.7.2/LICENSE

>>> github.com/zalando/go-keyring-v0.2.2
https://github.com/zalando/go-keyring/blob/v0.2.2/LICENSE

>>> gopkg.in/yaml.v2-v2.4.0
https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE.libyaml

Expand Down Expand Up @@ -133,6 +136,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


>>> github.com/zalando/go-keyring-v0.2.2

The MIT License (MIT)

Copyright (c) 2016 Zalando SE

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


>>> gopkg.in/yaml.v2-v2.4.0

The following files were ported to Go from C files of libyaml, and thus
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ compatibility. When possible, upgrade your Conjur version to match the
when using integrations, choose the latest suite release that matches your Conjur version. For any
questions, please contact us on [Discourse](https://discuss.cyberarkcommons.org/c/conjur/5).

## Compatability
## Compatibility

The `conjur-api-go` has been tested against the following Go versions:

- 1.17
- 1.17 (EOL)
- 1.18
- 1.19

## Installation

Expand Down
4 changes: 2 additions & 2 deletions bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cd "$(dirname "$0")"
trap teardown EXIT

export COMPOSE_PROJECT_NAME="conjurapigo_$(openssl rand -hex 3)"
export GO_VERSION="${1:-"1.17"}"
export GO_VERSION="${1:-"1.18"}"

# Spin up Conjur environment
source ./start-conjur.sh
Expand All @@ -24,7 +24,7 @@ failed() {
exit 1
}

# Golang container version to use: `1.17` or `1.18`
# Golang container version to use: `1.18` or `1.19`
announce "Running tests for Go version: $GO_VERSION...";
docker-compose run \
-e CONJUR_AUTHN_API_KEY \
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ services:
CONJUR_APPLIANCE_URL: http://conjur
CONJUR_ACCOUNT: cucumber

test-1.17:
test-1.18:
build:
context: .
args:
FROM_IMAGE: "golang:1.17"
FROM_IMAGE: "golang:1.18"
ports:
- 8080
depends_on:
Expand All @@ -38,11 +38,11 @@ services:
CONJUR_AUTHN_API_KEY:
GO_VERSION:

test-1.18:
test-1.19:
build:
context: .
args:
FROM_IMAGE: "golang:1.18"
FROM_IMAGE: "golang:1.19"
ports:
- 8080
depends_on:
Expand All @@ -61,7 +61,7 @@ services:
build:
context: .
args:
FROM_IMAGE: "golang:1.17"
FROM_IMAGE: "golang:1.19"
ports:
- 8080
depends_on:
Expand Down
4 changes: 3 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.18

require (
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
github.com/sirupsen/logrus v1.8.1
Expand All @@ -21,4 +23,4 @@ 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=