Using custom tags
Konflux allows tagging built images with custom tags. This tagging is handled by separate apply-tags task. The custom tags can be configured in two ways:
These can be combined and used together. |
Using konflux.additional-tags image label in your Dockerfile
You can specify the additional custom tags directly in your Dockerfile by using the konflux.additional-tags label, e.g.:
LABEL konflux.additional-tags="tag1"
If you want to specify multiple tags, they have to be separated by space or a comma, e.g.:
LABEL konflux.additional-tags="tag1 tag2"
LABEL konflux.additional-tags="tag1, tag2"
Using ADDITIONAL_TAGS parameter for apply-tags task
You can also specify additional custom tags by using ADDITIONAL_TAGS array parameter for apply-tags task in your PipelineRun definition, e.g:
...
- name: apply-tags
params:
- name: IMAGE
value: $(tasks.build-container.results.IMAGE_URL)
- name: ADDITIONAL_TAGS
value: ["tag1", "tag2"]
runAfter:
- build-container
taskRef:
params:
- name: name
value: apply-tags
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1
- name: kind
value: task
resolver: bundles
...
The array parameter ADDITIONAL_TAGS can also be specified differently:
...
- name: ADDITIONAL_TAGS
value:
- tag1
- tag2
...
The provided tags can also be based on dynamic variables that are provided by Pipelines as Code, e.g.:
To see all available dynamic variables, please see the dynamic variables section in the Pipeline as Code documentation |