-
Notifications
You must be signed in to change notification settings - Fork 0
Update "latest" tagged images on new tag #248
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
Merged
+138
−0
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2adceb7
Push latest floating tag for apollo-ci images
davdhacs b9117ca
test: verify latest tag is not pushed on PR builds
davdhacs 5881f63
Add workflow to promote images to stable tag
davdhacs 9855563
Simplify promote-stable: single job, server-side retag
davdhacs ff6a9c7
Default promote-stable version to 'latest'
davdhacs aa293dd
test: add tag trigger to test promote-stable workflow
davdhacs 5d0d269
Revert test trigger from promote-stable workflow
davdhacs 7f6e570
Only push latest tag for the newest version on main
davdhacs 0b19a43
Also verify tagged commit is on main before pushing latest
davdhacs f0d10ad
Reword skip message for latest tag push
davdhacs e3d4758
Add image tags and release process documentation
davdhacs c956205
Remove specific reviewer name from docs
davdhacs f732abb
Reword latest tag description in docs
davdhacs 0d2dfa1
Update README.md
davdhacs d08ee9a
Update README.md
davdhacs 7a0bdf9
Apply suggestion from @porridge
davdhacs 489be72
docs: add step-by-step guide for CI image changes
davdhacs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Promote to stable | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Version to promote (e.g. 0.5.7). Defaults to 'latest'." | ||
| required: false | ||
| default: "latest" | ||
|
|
||
| env: | ||
| QUAY_STACKROX_IO_RW_USERNAME: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }} | ||
| QUAY_STACKROX_IO_RW_PASSWORD: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }} | ||
|
|
||
| jobs: | ||
| promote-stable: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Log in to Quay | ||
| run: | | ||
| docker login -u "$QUAY_STACKROX_IO_RW_USERNAME" --password-stdin <<<"$QUAY_STACKROX_IO_RW_PASSWORD" quay.io | ||
| - name: Retag all flavors as stable | ||
| run: | | ||
| VERSION="${{ inputs.version }}" | ||
| VERSION="${VERSION:-latest}" | ||
| for flavor in scanner-build scanner-test stackrox-build stackrox-test stackrox-ui-test jenkins-plugin; do | ||
| SRC="quay.io/stackrox-io/apollo-ci:${flavor}-${VERSION}" | ||
| DST="quay.io/stackrox-io/apollo-ci:${flavor}-stable" | ||
| echo "Promoting ${SRC} → ${DST}" | ||
| docker buildx imagetools create --tag "${DST}" "${SRC}" | ||
| done |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all very nice and describes various bits and pieces. But what a random person who wants to bump a random dependency would look for is a step-by-step guide on how to get it out of the door.
We also need to agree on some sort of synchronization against multiple changes to this repo that are in flight. because there can only be one latest tag at a time so a single change to openshift/release can be tested at a given moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. I'll add a step-by-step walkthrough
And you're right, if someone is testing a
latest(current master of rox-ci-image) and a PR merges to rox-ci-image and pushes a new latest image and that gets mirrored, then the testing could get a newer "latest" than they expected.However, I think that is rare because we do not change these images often. Would it be helped or prevented if I add a GHA check that warns on PRs if the "stable" tag is older than the last "latest" tag on master? (So the PR creator could look at master to see what other changes are "in-flight" and not promoted to stable yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@porridge I merged this to unblock m.clasmeier. Does the updated readme look better, or what can be improved?