Skip to content

Commit

Permalink
Upgrade CircleCI machine image (#15215) (#15237)
Browse files Browse the repository at this point in the history
* Upgrade CircleCI machine image

* setting the path for ci-verify

* create GOPATH/bin
This is because CI failed with
cp: cannot create regular file '/home/circleci/go/bin/': Not a directory

* Update .circleci/config/jobs/pre-flight-checks.yml

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>

* updating config.yml

* source BASH_ENV

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
  • Loading branch information
hghaf099 and tomhjp committed Apr 29, 2022
1 parent 6281478 commit 8654831
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
14 changes: 11 additions & 3 deletions .circleci/config.yml

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

1 change: 1 addition & 0 deletions .circleci/config/commands/setup-go.yml
Expand Up @@ -24,6 +24,7 @@ steps:
rm -f "go${GO_VERSION}.linux-amd64.tar.gz"
GOPATH="/home/circleci/go"
mkdir $GOPATH 2>/dev/null || { sudo mkdir $GOPATH && sudo chmod 777 $GOPATH; }
mkdir $GOPATH/bin 2>/dev/null || { sudo mkdir $GOPATH/bin && sudo chmod 777 $GOPATH/bin; }
echo "export GOPATH='$GOPATH'" >> "$BASH_ENV"
echo "export PATH='$PATH:$GOPATH/bin:/usr/local/go/bin'" >> "$BASH_ENV"
echo "export GOPROXY=<<parameters.GOPROXY>>" >> "$BASH_ENV"
Expand Down
3 changes: 2 additions & 1 deletion .circleci/config/executors/@executors.yml
@@ -1,5 +1,6 @@
go-machine:
machine: true
machine:
image: ubuntu-2004:202201-02
shell: /usr/bin/env bash -euo pipefail -c
environment:
CIRCLECI_CLI_VERSION: 0.1.5546 # Pin CircleCI CLI to patch version (ex: 1.2.3)
Expand Down
7 changes: 6 additions & 1 deletion .circleci/config/jobs/pre-flight-checks.yml
Expand Up @@ -24,6 +24,11 @@ steps:
. $BASH_ENV
which circleci
circleci version
- run: make ci-verify
- run:
name: Verify CircleCI
command: |
set -x
. $BASH_ENV
make ci-verify
- configure-git
- refresh_go_mod_cache

0 comments on commit 8654831

Please sign in to comment.