Skip to content

Commit 2661fad

Browse files
authored
Merge pull request #180 from buildkite/pdp-1315-fix-ci-for-latest-tag-in-agent-stack-k8s
2 parents fd486c6 + d837774 commit 2661fad

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.buildkite/steps/build-and-push.sh

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -eufo pipefail
55
echo --- :hammer: Installing tools
66
apk add --update-cache --no-progress helm yq skopeo git
77

8+
echo --- :git::docker: determining version and tags
89
source .buildkite/steps/repo_info.sh
910

1011
echo --- :docker: Logging into ghcr.io

.buildkite/steps/repo_info.sh

+5
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ agent_image="${docker_repo_prefix}/agent-stack-k8s/agent:${version}"
1111
controller_image=$(buildkite-agent meta-data get controller-image)
1212
helm_repo="oci://${docker_repo_prefix}/helm"
1313
helm_image="$helm_repo/agent-stack-k8s:$version"
14+
15+
echo version="$version"
16+
echo controller_image="$controller_image"
17+
echo agent_image="$agent_image"
18+
echo helm_image="$helm_image"

.buildkite/steps/tag-latest.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
set -eufo pipefail
44

5-
source .buildkite/steps/repo_info.sh
6-
75
echo --- :hammer: Installing tools
8-
apk add --update-cache --no-progress crane
6+
apk add --update-cache --no-progress crane git
7+
8+
echo --- :git::docker: determining version and tags
9+
source .buildkite/steps/repo_info.sh
910

10-
echo --- :doker: Logging into ghcr.io
11+
echo --- :docker: Logging into ghcr.io
1112
crane auth login ghcr.io \
1213
--username "$REGISTRY_USERNAME" \
1314
--password "$REGISTRY_PASSWORD"
1415

15-
echo --- :crane: tagging images latest on ghcr.io
16+
echo --- :docker: tagging images latest on ghcr.io
1617
crane tag "$controller_image" latest
1718
crane tag "$agent_image" latest
18-
crane tag "$helm_image" latest
19+
crane tag "${helm_image#oci://}" latest

0 commit comments

Comments
 (0)