-
Notifications
You must be signed in to change notification settings - Fork 54
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
Move container images creation to release workflow #386
Move container images creation to release workflow #386
Conversation
.github/workflows/release.yaml
Outdated
tags: | | ||
${{ steps.get_tag.outputs.release_version }} | ||
latest | ||
main |
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 syntax looks strange. The doc does seem to imply you can specify multiple tags separated by whitespace, so I'm sure this works, but wow it looks odd! (Feel free to resolve this, as there's no action I'm really looking to have done here)
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.
Actually, I lied - I'm pretty sure we don't want to tag main here. Maybe latest. This is a release workflow that triggers on tags. Main and often will contain commits that are beyond a given release.
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.
Sorry about the syntax 🙃 I agree it's not super pretty, but I'd say I've seen worse.
You're right, I'll remove building and pushing of main
. I'm wondering if we should keep the Build Trigger or create a new Github Workflow to build the main
image.
To clarify, we have 4 types of images:
x.y.z
(i.e. version tags): built as part of the release process (currently using Quay Build Triggers, replaced in this PR by a step in "release.yaml" worfklow)latest
: follows the latestx.y.z
. Currently retagged at the end of the "build.yaml" on release, moved in this PR to "release.yaml"0.1.0
(i.e. dev release): built on each push to the main branch, currently in "dev_release.yaml" workflow. I think we should leave this untouched.main
: built for each push on the main branch via a Quay Build Trigger.
So, AFAICT the 0.1.0
and the main
tag are always in sync. How do we want to build main
? We have following options:
- Leave the current Build Trigger untouched.
- Create a new GitHub workflow specifically for building the
main
image (triggered on each push to the main branch) - Reuse the "dev_release.yaml" workflow as it is triggered for each push to the main branch already, and integrate building the main image there.
Not a big fan of 3. personally, as I prefer to separate concerns. 1. means that we keep a build trigger active, and I was hoping to get rid of all Build Triggers here (not that I dislike Build Triggers, but I'd prefer having all the builds happening in the same place i.e. GitHub Actions). That leaves us with 2., even though I'd prefer not to create yet another workflow, I believe that's reasonable.
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.
Option 2 or 3 is the right way forward. We don't have to make them the same workflow, we can just make the existing workflow for 0.1.0 reusable. Easy enough!
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.
Clarity: Dealing with the main tag doesn't need to happen in this PR. We can do it at a later time. The build trigger won't go away until this lands anyway.
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.
I added a workflow for tagging the main branch in this PR.
.github/workflows/release.yaml
Outdated
podman build \ | ||
-t quay.io/redhat-certification/chart-verifier:$image_tag \ | ||
-t quay.io/redhat-certification/chart-verifier:latest \ | ||
-t quay.io/redhat-certification/chart-verifier:main . |
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.
Same thing here re: main (see other comment for details)
.github/workflows/release.yaml
Outdated
run: | | ||
# Build podman images locally | ||
image_tag=${{ steps.get_tag.outputs.release_version }} | ||
podman build \ |
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.
Do we want this to exist as a make target?
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.
Created a make target
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.
Couple of things to consider mentioned in comments. Otherwise, looks pretty good. Once merged, I'll go disconnect the Quay auto-build.
Oh! You might want to remove the build status from README.md.
This makes it possible to retrigger the entire release process, including all assets creation, by retagging the main branch. Starting with this commit, build triggers on the quay.io/redhat-certification/chart-verifier repo are no longer needed. close redhat-certification#383
a523da1
to
1f8b13a
Compare
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.
/lgtm
Build triggers have been disabled in Quay.
This makes it possible to retrigger the entire release process, including all assets creation, by retagging the main branch.
Starting with this commit, build triggers on the
quay.io/redhat-certification/chart-verifier repo are no longer needed.
close #383