Build the Docker image with a separate Dockerfile ref#2606
Open
fnando wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Decouples the Docker workflow’s build recipe (Dockerfile) from the source revision being compiled, so older release tags can be built using the current Dockerfile while still compiling the CLI at the requested source ref.
Changes:
- Adds a new
dockerfile_refworkflow input (defaultmain) separate from the sourceref. - Updates the
preparejob to resolve and output both immutable SHAs (source_sha,dockerfile_sha) and compute tags from the source ref. - Updates
build/mergeto check out the Dockerfile SHA while passing the source SHA into the Docker build asSTELLAR_CLI_REV.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Decouple the Dockerfile/build recipe from the source revision in the Docker workflow. A new
dockerfile_refinput (defaultmain) controls where the Dockerfile comes from, independent of therefbeing compiled. Thepreparejob now resolves both refs to immutable SHAs and outputssource_sha,dockerfile_sha, and the tags;buildchecks outdockerfile_shawhile passingsource_shatocargo install --git … --rev; andmergechecks outdockerfile_sha.Why
After #2605 the build checked out the source ref to obtain the Dockerfile, so dispatching with a ref that predates the current Dockerfile — e.g. an existing release tag like
v26.1.0— failed because the checked-out tree still had the oldCOPY-based recipe. Separating the two refs lets an old release tag be built with the current recipe, which is the whole point of installing the CLI from--git … --rev. Resolving both refs to SHAs once also keeps every architecture and the published manifest consistent.Known limitations
The Dockerfile ref defaults to
main, so dispatching against a branch whose recipe has not been merged still requires passingdockerfile_refexplicitly. This workflow remains a temporary measure untilstellar/stellar-cli-dockerpublishes images.