@@ -10,12 +10,6 @@ executors:
1010 docker :
1111 - image : cimg/go:1.26.0
1212
13- commands :
14- install_goreleaser_dependencies :
15- description : Register Docker platforms for multi-arch builds (arm64, armv7)
16- steps :
17- - run : docker run --privileged --rm tonistiigi/binfmt --install all
18-
1913references :
2014 e2e_config : &e2e_config
2115 command_runner_image : quay.io/reactiveops/ci-images:v14-bullseye
@@ -37,10 +31,28 @@ references:
3731 command : |
3832 apk --update add curl yq
3933 cd /tmp
40- curl -LO https://releases.hashicorp.com/vault/1.12.2 /vault_1.12.2_linux_amd64 .zip
41- sha256sum vault_1.12.2_linux_amd64 .zip | grep 116c143de377a77a7ea455a367d5e9fe5290458e8a941a6e2dd85d92aaedba67
42- unzip vault_1.12.2_linux_amd64 .zip
34+ curl -LO https://releases.hashicorp.com/vault/1.21.4 /vault_1.21.4_linux_amd64 .zip
35+ sha256sum vault_1.21.4_linux_amd64 .zip | grep 889b681990fe221b884b7932fa9c9dd0ee9811b9349554f1aa287ab63c9f3dae
36+ unzip vault_1.21.4_linux_amd64 .zip
4337 mv vault /usr/bin/vault
38+ install_vault_machine : &install_vault_machine
39+ run :
40+ name : install hashicorp vault
41+ command : |
42+ sudo apt-get update -y && sudo apt-get install -y curl unzip
43+ cd /tmp
44+ curl -LO https://releases.hashicorp.com/vault/1.21.4/vault_1.21.4_linux_amd64.zip
45+ echo '889b681990fe221b884b7932fa9c9dd0ee9811b9349554f1aa287ab63c9f3dae vault_1.21.4_linux_amd64.zip' | sha256sum -c
46+ unzip -o vault_1.21.4_linux_amd64.zip
47+ sudo mv vault /usr/bin/vault
48+ setup_qemu_binfmt : &setup_qemu_binfmt
49+ run :
50+ name : Setup QEMU for multi-arch Docker builds
51+ command : |
52+ sudo apt-get update -y
53+ sudo apt-get install -y qemu-user-static binfmt-support
54+ docker buildx create --use || true
55+ docker buildx inspect --bootstrap
4456 install_circleci : &install_circleci
4557 run :
4658 name : Install CircleCI CLI
@@ -60,17 +72,13 @@ jobs:
6072 - run : go mod download && go mod verify
6173 - run : go test -v ./... -coverprofile=coverage.txt -covermode=atomic
6274 release :
63- working_directory : /home/circleci/go/src/github.com/fairwindsops/pluto
75+ machine :
76+ image : ubuntu-2204:current
6477 resource_class : large
6578 shell : /bin/bash
66- docker :
67- - image : goreleaser/goreleaser:v2.14.0
68- environment :
69- GO111MODULE : " on"
7079 steps :
7180 - checkout
72- - setup_remote_docker
73- - *install_vault_alpine
81+ - *install_vault_machine
7482 - rok8s/get_vault_env :
7583 vault_path : repo/global/env
7684 - rok8s/get_vault_env :
@@ -79,18 +87,32 @@ jobs:
7987 name : docker login
8088 command : |
8189 docker login -u _json_key -p "$(echo $GCP_ARTIFACTREADWRITE_JSON_KEY | base64 -d)" us-docker.pkg.dev
82- - install_goreleaser_dependencies
83- - run : echo 'export GORELEASER_CURRENT_TAG="${CIRCLE_TAG}"' >> $BASH_ENV
84- - run : goreleaser
90+ - *setup_qemu_binfmt
91+ - run :
92+ name : Run GoReleaser release
93+ command : |
94+ export GORELEASER_CURRENT_TAG="${CIRCLE_TAG}"
95+ docker run --rm \
96+ -v /var/run/docker.sock:/var/run/docker.sock \
97+ -v "$(pwd):/workspace" -w /workspace \
98+ -e GORELEASER_CURRENT_TAG -e CIRCLE_TAG -e CIRCLE_SHA1 \
99+ -e GO111MODULE=on \
100+ goreleaser/goreleaser:v2.14.0
85101 snapshot :
86- working_directory : /home/circleci/go/src/github.com/fairwindsops/pluto
102+ machine :
103+ image : ubuntu-2204:current
87104 resource_class : large
88- docker :
89- - image : goreleaser/goreleaser:v2.14.0
90105 steps :
91106 - checkout
92- - setup_remote_docker
93- - run : goreleaser --snapshot --skip=sign
107+ - *setup_qemu_binfmt
108+ - run :
109+ name : Run GoReleaser snapshot
110+ command : |
111+ docker run --rm \
112+ -v /var/run/docker.sock:/var/run/docker.sock \
113+ -v "$(pwd):/workspace" -w /workspace \
114+ -e CIRCLE_SHA1 -e CIRCLE_BRANCH -e CIRCLE_TAG \
115+ goreleaser/goreleaser:v2.14.0 --snapshot --skip=sign
94116 - store_artifacts :
95117 path : dist
96118 destination : snapshot
0 commit comments