Containerfile: Add a release_type label to control floating tag#511
Containerfile: Add a release_type label to control floating tag#511owtaylor wants to merge 1 commit into
Conversation
We currently tag every single build - whether from a tagged release or not as `:latest` in our Konflux-backed quay.io builds. To allow us to only label tagged releases with the `:latest` tag add a label to the Containerfile that is `latest` (for a tagged release) and `dev` otherwise.
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Jazzcort
left a comment
There was a problem hiding this comment.
My thought could be wrong. 😆
| - name: ADDITIONAL_TAGS | ||
| value: | ||
| - $(params.additional-tags[*]) | ||
| - $(params.tag-prefix)$(tasks.clone-repository.results.short-commit) |
There was a problem hiding this comment.
Shouldn't we just add an entry here to grab the release_type from get version?
- name: ADDITIONAL_TAGS
value:
- $(params.additional-tags[*])
- $(params.tag-prefix)$(tasks.clone-repository.results.short-commit)
- $(tasks.get-version.results.release_type)And we delete the entire additional-tags entry from spec.params in push.yaml.
Or I might misunderstand something. 😆
There was a problem hiding this comment.
You're absolutely correct. Good catch!
|
This is a lot trickier than it should be. There are two places where the Excerpt from the release plan admission parameters: ...
data:
mapping:
registrySecret: konflux-release-service-access-management-token
components:
- name: linux-mcp-server
public: true
pushSourceContainer: false
repositories:
- url: quay.io/redhat-services-prod/rhel-lightspeed-tenant/linux-mcp-server
tags:
- latest
- "{{ git_short_sha }}"
- "{{ labels.version }}"
...For the push task, we can directly control the labels that get applied by using outputs from custom tasks. But the only way to send data to the release pipeline is through container image labels. We need to remove That will solve one problem, but what we need is actually a bit more complicated. The Say we have version 1.y and 2.y released. If we push a new 1.y.z version, it will get the |
We currently tag every single build - whether from a tagged release or not as
:latestin our Konflux-backed quay.io builds. To allow us to only label tagged releases with the:latesttag add a label to the Containerfile that islatest(for a tagged release) anddevotherwise.