Skip to content

Commit

Permalink
Remove Golang 1.16 from CI, replace with 1.18
Browse files Browse the repository at this point in the history
Golang 1.16 support was removed in #121 but
remained in the CI. This commit removes
it and adds 1.18 as an additional tested version
  • Loading branch information
szh committed Aug 19, 2022
1 parent 8c869fe commit 8ed391e
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ test:
artifacts:
untracked: true
reports:
junit: output/junit-1.16.xml
junit: output/junit-1.17.xml
when: always
script:
- apk add --no-cache py-pip
- pip install docker-compose
- export TEST_VERSION=oss
- ./test.sh 1.16
- ./test.sh 1.17
only:
- branches

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.16
./bin/test.sh 1.17
```

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

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

To run just the tests against just the Conjur Open Source, run:

Expand Down
16 changes: 8 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ pipeline {
}
}

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

stage('Run tests: Golang 1.16') {
stage('Run tests: Golang 1.17') {
steps {
sh './bin/test.sh 1.16'
junit 'output/1.16/junit.xml'
sh './bin/test.sh 1.17'
junit 'output/1.17/junit.xml'
cobertura autoUpdateHealth: false,
autoUpdateStability: false,
coberturaReportFile: 'output/1.16/coverage.xml',
coberturaReportFile: 'output/1.17/coverage.xml',
conditionalCoverageTargets: '30, 0, 0',
failUnhealthy: true,
failUnstable: false,
Expand All @@ -44,7 +44,7 @@ pipeline {
onlyStable: false,
sourceEncoding: 'ASCII',
zoomCoverageChart: false
sh 'cp output/1.16/c.out .'
sh 'cp output/1.17/c.out .'
ccCoverage("gocov", "--prefix github.com/cyberark/conjur-api-go")
}
}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright (c) 2020 CyberArk Software Ltd. All rights reserved.
Copyright (c) 2022 CyberArk Software Ltd. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ questions, please contact us on [Discourse](https://discuss.cyberarkcommons.org/

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

- 1.16
- 1.17
- 1.18

## Installation

Expand Down Expand Up @@ -117,6 +117,6 @@ guide][contrib].

## License

Copyright (c) 2020 CyberArk Software Ltd. All rights reserved.
Copyright (c) 2022 CyberArk Software Ltd. All rights reserved.

This repository is licensed under Apache License 2.0 - see [`LICENSE`](LICENSE) for more details.
4 changes: 2 additions & 2 deletions bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cd "$(dirname "$0")"
. ./utils.sh

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

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

# Golang container version to use: `1.16` or `1.17`
# Golang container version to use: `1.17` or `1.18`
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 @@ -26,11 +26,11 @@ services:
ports:
- 443

test-1.16:
test-1.17:
build:
context: .
args:
FROM_IMAGE: "golang:1.16"
FROM_IMAGE: "golang:1.17"
ports:
- 8080
depends_on:
Expand All @@ -52,11 +52,11 @@ services:
TEST_VERSION:
GO_VERSION:

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 @@ -82,7 +82,7 @@ services:
build:
context: .
args:
FROM_IMAGE: "golang:1.16"
FROM_IMAGE: "golang:1.17"
ports:
- 8080
depends_on:
Expand Down

0 comments on commit 8ed391e

Please sign in to comment.