Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the tools/merge-docker-images.sh script more generic #2334

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

bfops
Copy link
Collaborator

@bfops bfops commented Mar 4, 2025

Description of Changes

This is a non-functional change to make the tools/merge-docker-images.sh script more generic/flexible.

This PR is a series of small (stacking) changes:

API and ABI breaking changes

This does not change code.

Expected complexity level and risk

1

Testing

  • When I make the CI run on this branch, we successfully get all the docker tags (platform-specified, unified, and ref-tagged)

@bfops bfops requested a review from jdetter March 4, 2025 00:04
@bfops bfops marked this pull request as ready for review March 4, 2025 05:55
@@ -59,7 +59,7 @@ jobs:

- name: Merge images
run: |
./tools/merge-docker-images.sh $GITHUB_SHA
./tools/merge-docker-images.sh clockworklabs/spacetimedb "commit-${GITHUB_SHA:0:7}" "${GITHUB_SHA:0:7}-full"
Copy link
Collaborator Author

@bfops bfops Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first param should match what used to be hardcoded in the original script below

the second param should match the old definition of TAG in the original script below

the third param should match the old definition of FULL_TAG in the original script below

@bfops bfops force-pushed the bfops/align-merge-script branch from 0b688d9 to bd85d27 Compare March 4, 2025 07:11
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -u
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is new (not copied from anywhere), but since I added more params I wanted to add this so that the script behaves more predictably if one of the params isn't provided

@@ -36,6 +37,8 @@ docker manifest annotate "${IMAGE_NAME}":$FULL_TAG \

docker manifest push "${IMAGE_NAME}":$FULL_TAG

# if undefined, use the empty string
GITHUB_REF="${GITHUB_REF-}"
Copy link
Collaborator Author

@bfops bfops Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a version of this script floating around that uses a [ -n "${GITHUB_REF" ] check. I'm not sure when that comes up, but just in case we do have undefined GITHUB_REF I wanted to do this so that the script doesn't fail in a surprising way.

@bfops bfops added release-any To be landed in any release window no runtime change This change does not affect the final binaries labels Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no runtime change This change does not affect the final binaries release-any To be landed in any release window
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant