Skip to content

Commit

Permalink
Do 'latest' tag push immediately after release-tagged one
Browse files Browse the repository at this point in the history
To be more robust against unnecessary rebuilds

Signed-off-by: Anna Rift <[email protected]>
  • Loading branch information
riftEmber committed Oct 8, 2024
1 parent ba77981 commit fc39ae0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions util/cron/test-docker.bash
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ update_image() {
# Anna, 2024-10-07
docker buildx build --platform=linux/amd64,linux/arm64 --push . -t "$imageName"
BUILD_RESULT=$?
# Also push as 'latest' tag if this is a release build
if [ -n "$release_tag" ]
then
# Use base image name (without tag) to use Docker's default tag 'latest'
docker buildx build --platform=linux/amd64,linux/arm64 . --push -t "$baseImageName"
fi

if [ $BUILD_RESULT -ne 0 ]
then
echo "docker build failed for $imageName image"
Expand All @@ -93,13 +100,6 @@ update_image() {
echo "docker commands succeeded inside chapel $imageName container"
fi

# Also push as 'latest' tag if this is a release build
if [ -n "$release_tag" ]
then
# Use base image name (without tag) to use Docker's default tag 'latest'
docker buildx build --platform=linux/amd64,linux/arm64 . --push -t "$baseImageName"
fi

log_info "Completed $imageName"
}

Expand Down

0 comments on commit fc39ae0

Please sign in to comment.