Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions build-system/scripts/check_rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ REPOSITORY=$2
[[ "$COMMIT_MESSAGE" == *"[ci rebuild $REPOSITORY]"* ]] && exit 1
[[ "$COMMIT_MESSAGE" == *"[ci rebuild]"* ]] && exit 1

COMMIT_TAG_VERSION=$(extract_tag_version $REPOSITORY)
DOCKERFILE=$(query_manifest dockerfile $REPOSITORY)

# If we are deploying, and our Dockerfile uses the COMMIT_TAG arg, we need to rebuild to ensure the latest version
# number is baked into the image.
# TODO: This should probably be properly handled by e.g. release-please bumping the version number as part of its PR
# which would invalidate the content hash, rather than us using Dockerfile ARGS.
if [ -n "$COMMIT_TAG_VERSION" ] && grep -qE "^ARG COMMIT_TAG=" $DOCKERFILE; then
if [ -n "$COMMIT_TAG" ] && grep -qE "^ARG COMMIT_TAG=" $DOCKERFILE; then
exit 1
fi

Expand Down