Update CI and release go versions to 1.17.5 (#11799)

This commit is contained in:
Chris S. Kim 2021-12-10 14:04:56 -05:00 committed by GitHub
parent db7c814722
commit db6c2663be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 24 deletions

3
.changelog/11799.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
ci: Upgrade to use Go 1.17.5
```

View File

@ -15,7 +15,7 @@ references:
images: images:
# When updating the Go version, remember to also update the versions in the # When updating the Go version, remember to also update the versions in the
# workflows section for go-test-lib jobs. # workflows section for go-test-lib jobs.
go: &GOLANG_IMAGE docker.mirror.hashicorp.services/circleci/golang:1.17.2 go: &GOLANG_IMAGE docker.mirror.hashicorp.services/cimg/go:1.17.5
ember: &EMBER_IMAGE docker.mirror.hashicorp.services/circleci/node:14-browsers ember: &EMBER_IMAGE docker.mirror.hashicorp.services/circleci/node:14-browsers
paths: paths:
@ -23,7 +23,6 @@ references:
cache: cache:
yarn: &YARN_CACHE_KEY consul-ui-v6-{{ checksum "ui/yarn.lock" }} yarn: &YARN_CACHE_KEY consul-ui-v6-{{ checksum "ui/yarn.lock" }}
rubygem: &RUBYGEM_CACHE_KEY static-site-gems-v1-{{ checksum "Gemfile.lock" }}
environment: &ENVIRONMENT environment: &ENVIRONMENT
TEST_RESULTS_DIR: *TEST_RESULTS_DIR TEST_RESULTS_DIR: *TEST_RESULTS_DIR
@ -134,7 +133,7 @@ jobs:
name: Install golangci-lint name: Install golangci-lint
command: | command: |
download=https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh download=https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh
wget -O- -q $download | sh -x -s -- -d -b /go/bin/ v1.40.1 wget -O- -q $download | sh -x -s -- -d -b /home/circleci/go/bin v1.40.1
- run: go mod download - run: go mod download
- run: - run:
name: lint name: lint
@ -211,10 +210,9 @@ jobs:
steps: steps:
- checkout - checkout
- attach_workspace: - attach_workspace:
at: /go/bin at: /home/circleci/go/bin
- run: sudo apt-get update --allow-releaseinfo-change-suite --allow-releaseinfo-change-version && sudo apt-get install -y rsyslog - run: sudo apt-get update --allow-releaseinfo-change-suite --allow-releaseinfo-change-version && sudo apt-get install -y rsyslog
- run: sudo service rsyslog start - run: sudo service rsyslog start
- run: *install-gotestsum
- run: go mod download - run: go mod download
- run: - run:
name: go test name: go test
@ -261,7 +259,6 @@ jobs:
# but we can run a little over that limit. # but we can run a little over that limit.
steps: steps:
- checkout - checkout
- run: *install-gotestsum
- run: go mod download - run: go mod download
- run: - run:
name: go test -race name: go test -race
@ -298,7 +295,6 @@ jobs:
GOTAGS: "" # No tags for OSS but there are for enterprise GOTAGS: "" # No tags for OSS but there are for enterprise
steps: steps:
- checkout - checkout
- run: *install-gotestsum
- run: go mod download - run: go mod download
- run: - run:
name: go test 32-bit name: go test 32-bit
@ -332,15 +328,14 @@ jobs:
path: path:
type: string type: string
docker: docker:
- image: "docker.mirror.hashicorp.services/circleci/golang:<<parameters.go-version>>" - image: "docker.mirror.hashicorp.services/cimg/go:<<parameters.go-version>>"
environment: environment:
<<: *ENVIRONMENT <<: *ENVIRONMENT
GOTAGS: "" # No tags for OSS but there are for enterprise GOTAGS: "" # No tags for OSS but there are for enterprise
steps: steps:
- checkout - checkout
- attach_workspace: - attach_workspace:
at: /go/bin at: /home/circleci/go/bin
- run: *install-gotestsum
- run: - run:
working_directory: <<parameters.path>> working_directory: <<parameters.path>>
command: go mod download command: go mod download
@ -442,7 +437,7 @@ jobs:
# save dev build to pass to downstream jobs # save dev build to pass to downstream jobs
- persist_to_workspace: - persist_to_workspace:
root: /go/bin root: /home/circleci/go/bin
paths: paths:
- consul - consul
- run: *notify-slack-failure - run: *notify-slack-failure
@ -494,7 +489,7 @@ jobs:
- run: make ci.dev-docker - run: make ci.dev-docker
- run: *notify-slack-failure - run: *notify-slack-failure
# Nomad 0.8 builds on go0.10 # Nomad 0.8 builds on go1.10
# Run integration tests on nomad/v0.8.7 # Run integration tests on nomad/v0.8.7
nomad-integration-0_8: nomad-integration-0_8:
docker: docker:
@ -538,7 +533,7 @@ jobs:
# run integration tests on nomad/main # run integration tests on nomad/main
nomad-integration-main: nomad-integration-main:
docker: docker:
- image: *GOLANG_IMAGE - image: docker.mirror.hashicorp.services/circleci/golang:1.17 # TODO: replace with cimg/go (requires steps update)
environment: environment:
<<: *ENVIRONMENT <<: *ENVIRONMENT
NOMAD_WORKING_DIR: /go/src/github.com/hashicorp/nomad NOMAD_WORKING_DIR: /go/src/github.com/hashicorp/nomad

View File

@ -61,15 +61,15 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- {go: "1.17", goos: "linux", goarch: "386"} - {go: "1.17.5", goos: "linux", goarch: "386"}
- {go: "1.17", goos: "linux", goarch: "amd64"} - {go: "1.17.5", goos: "linux", goarch: "amd64"}
- {go: "1.17", goos: "linux", goarch: "arm"} - {go: "1.17.5", goos: "linux", goarch: "arm"}
- {go: "1.17", goos: "linux", goarch: "arm64"} - {go: "1.17.5", goos: "linux", goarch: "arm64"}
- {go: "1.17", goos: "freebsd", goarch: "386"} - {go: "1.17.5", goos: "freebsd", goarch: "386"}
- {go: "1.17", goos: "freebsd", goarch: "amd64"} - {go: "1.17.5", goos: "freebsd", goarch: "amd64"}
- {go: "1.17", goos: "windows", goarch: "386"} - {go: "1.17.5", goos: "windows", goarch: "386"}
- {go: "1.17", goos: "windows", goarch: "amd64"} - {go: "1.17.5", goos: "windows", goarch: "amd64"}
- {go: "1.17", goos: "solaris", goarch: "amd64"} - {go: "1.17.5", goos: "solaris", goarch: "amd64"}
fail-fast: true fail-fast: true
name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
@ -168,7 +168,7 @@ jobs:
matrix: matrix:
goos: [ darwin ] goos: [ darwin ]
goarch: [ "amd64" ] goarch: [ "amd64" ]
go: [ "1.17" ] go: [ "1.17.5" ]
fail-fast: true fail-fast: true
name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build

View File

@ -1,4 +1,4 @@
ARG GOLANG_VERSION=1.17.2 ARG GOLANG_VERSION=1.17.5
FROM golang:${GOLANG_VERSION} FROM golang:${GOLANG_VERSION}
ARG GOTOOLS="github.com/elazarl/go-bindata-assetfs/... \ ARG GOTOOLS="github.com/elazarl/go-bindata-assetfs/... \