Skip to content

Commit

Permalink
Merge pull request #180 from buildkite/pdp-1315-fix-ci-for-latest-tag…
Browse files Browse the repository at this point in the history
…-in-agent-stack-k8s
  • Loading branch information
triarius authored Jul 11, 2023
2 parents fd486c6 + d837774 commit 2661fad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions .buildkite/steps/build-and-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -eufo pipefail
echo --- :hammer: Installing tools
apk add --update-cache --no-progress helm yq skopeo git

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

echo --- :docker: Logging into ghcr.io
Expand Down
5 changes: 5 additions & 0 deletions .buildkite/steps/repo_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ agent_image="${docker_repo_prefix}/agent-stack-k8s/agent:${version}"
controller_image=$(buildkite-agent meta-data get controller-image)
helm_repo="oci://${docker_repo_prefix}/helm"
helm_image="$helm_repo/agent-stack-k8s:$version"

echo version="$version"
echo controller_image="$controller_image"
echo agent_image="$agent_image"
echo helm_image="$helm_image"
13 changes: 7 additions & 6 deletions .buildkite/steps/tag-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

set -eufo pipefail

source .buildkite/steps/repo_info.sh

echo --- :hammer: Installing tools
apk add --update-cache --no-progress crane
apk add --update-cache --no-progress crane git

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

echo --- :doker: Logging into ghcr.io
echo --- :docker: Logging into ghcr.io
crane auth login ghcr.io \
--username "$REGISTRY_USERNAME" \
--password "$REGISTRY_PASSWORD"

echo --- :crane: tagging images latest on ghcr.io
echo --- :docker: tagging images latest on ghcr.io
crane tag "$controller_image" latest
crane tag "$agent_image" latest
crane tag "$helm_image" latest
crane tag "${helm_image#oci://}" latest

0 comments on commit 2661fad

Please sign in to comment.