Skip to content

Commit

Permalink
Changing GOPATH and cache location
Browse files Browse the repository at this point in the history
  • Loading branch information
mladlow committed Dec 13, 2021
1 parent 558dba9 commit 519c9bc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions .circleci/config.yml

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

2 changes: 1 addition & 1 deletion .circleci/config/commands/@caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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
4 changes: 2 additions & 2 deletions .circleci/config/commands/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ steps:
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 /home/circleci/go/src/github.com/hashicorp/vault/ \
-e CIRCLECI -e VAULT_CI_GO_TEST_RACE \
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 519c9bc

Please sign in to comment.