Fail PR build if any image SHA placeholders are found - #179
Merged
robobario merged 1 commit intoAug 4, 2025
Merged
Conversation
9 tasks
The intent is to prevent documentation PRs from merging until we manually update the PR with the SHAs. Signed-off-by: Robert Young <robertyoungnz@gmail.com>
robobario
force-pushed
the
block-release-on-placeholder-shas
branch
from
August 4, 2025 22:07
906d4a6 to
daf99ff
Compare
tombentley
approved these changes
Aug 4, 2025
tombentley
left a comment
Member
There was a problem hiding this comment.
A couple of nits, otherwise LGTM. Thanks.
| - name: Require release manifests to contain non-placeholder container image SHAs | ||
| run: | | ||
| PLACEHOLDER="REPLACE_WITH_SHA_AFTER_IMAGE_RELEASE" | ||
| # || true prevents the script failing when 0 matches are found |
Member
There was a problem hiding this comment.
Is the || true part commented out code?
Member
Author
There was a problem hiding this comment.
yep, it's a comment on why we've got to include an || true, so that githubs set -e doesn't fail the script fast.
| run: | | ||
| PLACEHOLDER="REPLACE_WITH_SHA_AFTER_IMAGE_RELEASE" | ||
| # || true prevents the script failing when 0 matches are found | ||
| matching_files=$(grep -r -l "${PLACEHOLDER}" _data/release/ || true) |
Member
There was a problem hiding this comment.
I guess for should add -F, because you've not said that PLACEHOLDER is intended to be a regex.
Member
There was a problem hiding this comment.
Some how I didn't connect it up with the following line. I would write this as
# The `|| true` below prevents the script failing when 0 matches are found
But I don't think it's worth a PR to change it.
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.
The intent is to prevent documentation PRs from merging until we manually update the PR with the SHAs.
See matching PR kroxylicious/kroxylicious#2529
The image shas are only available after the image build, which happens in response to the release tag being pushed up. So they are not available at the point we are currently creating the documentation PR.