Skip to content

Commit

Permalink
Main go version bump (#13408)
Browse files Browse the repository at this point in the history
* Go 1.17.2 -> 1.17.5
* Switching to cimg
  • Loading branch information
mladlow committed Dec 14, 2021
1 parent 15dea20 commit fcc5f22
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 83 deletions.
106 changes: 53 additions & 53 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions .circleci/config/commands/@caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ save_yarn_cache:
- ui/node_modules
# allows restoring go mod caches by incomplete prefix. This is useful when re-generating
# cache, but not when running builds and tests that require an exact match.
# TODO should we be including arch in cache key?
restore_go_mod_cache_permissive:
steps:
- restore_cache:
name: Restore closest matching go modules cache
keys:
- &gocachekey v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}}
- v1.3-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}
- v1.3-{{checksum "go.sum"}}
- &gocachekey v1.4-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}-{{checksum "api/go.sum"}}
- v1.4-{{checksum "go.sum"}}-{{checksum "sdk/go.sum"}}
- v1.4-{{checksum "go.sum"}}
restore_go_mod_cache:
steps:
- restore_cache:
Expand All @@ -32,7 +33,7 @@ save_go_mod_cache:
name: Save go modules cache
key: *gocachekey
paths:
- /go/pkg/mod
- /home/circleci/go/pkg/mod
refresh_go_mod_cache:
steps:
- restore_go_mod_cache_permissive
Expand Down
14 changes: 7 additions & 7 deletions .circleci/config/commands/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
default: false
go_image:
type: string
default: "docker.mirror.hashicorp.services/circleci/golang:1.17.2-buster"
default: "docker.mirror.hashicorp.services/cimg/go:1.17.5"
use_docker:
type: boolean
default: false
Expand Down Expand Up @@ -139,15 +139,15 @@ steps:
# Run tests
test -d << parameters.cache_dir >> && docker cp << parameters.cache_dir >> testcontainer:/tmp/gocache
docker exec testcontainer sh -c 'mkdir -p /go/src/github.com/hashicorp/vault'
docker cp . testcontainer:/go/src/github.com/hashicorp/vault/
docker exec testcontainer sh -c 'mkdir -p /home/circleci/go/src/github.com/hashicorp/vault'
docker cp . testcontainer:/home/circleci/go/src/github.com/hashicorp/vault/
docker cp $DOCKER_CERT_PATH/ testcontainer:$DOCKER_CERT_PATH
# Copy the downloaded modules inside the container.
docker exec testcontainer sh -c 'mkdir -p /go/pkg'
docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/go/pkg/mod
docker exec testcontainer sh -c 'mkdir -p /home/circleci/go/pkg'
docker cp "$(go env GOPATH)/pkg/mod" testcontainer:/home/circleci/go/pkg/mod
docker exec -w /go/src/github.com/hashicorp/vault/ \
docker exec -w /home/circleci/go/src/github.com/hashicorp/vault/ \
-e CIRCLECI -e VAULT_CI_GO_TEST_RACE \
-e GOCACHE=/tmp/gocache \
-e GO_TAGS \
Expand Down Expand Up @@ -185,7 +185,7 @@ steps:
name: Copy test results
when: always
command: |
docker cp testcontainer:/go/src/github.com/hashicorp/vault/test-results .
docker cp testcontainer:/home/circleci/go/src/github.com/hashicorp/vault/test-results .
docker cp testcontainer:/tmp/gocache << parameters.cache_dir >>
- when:
condition: << parameters.save_cache >>
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config/commands/setup-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ steps:
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go${GO_VERSION}.linux-amd64.tar.gz"
rm -f "go${GO_VERSION}.linux-amd64.tar.gz"
GOPATH="/go"
GOPATH="/home/circleci/go"
mkdir $GOPATH 2>/dev/null || { sudo mkdir $GOPATH && sudo chmod 777 $GOPATH; }
echo "export GOPATH='$GOPATH'" >> "$BASH_ENV"
echo "export PATH='$PATH:$GOPATH/bin:/usr/local/go/bin'" >> "$BASH_ENV"
Expand Down

0 comments on commit fcc5f22

Please sign in to comment.