Skip to content

Commit

Permalink
Provide an example of combining the two approaches
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Oct 15, 2024
1 parent 8121f1b commit e48bdce
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions docs/modules/ROOT/pages/how-tos/configuring/dynamic-labels.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ Konflux allows applying some dynamic labels to images derived from properties an
. <<supplying-labels-to-the-build-container-task>>
. <<generating-dynamic-labels>>
. <<incrementing-release-label>>

[NOTE]
====
These can be combined and used together.
====
. <<combining-approaches>>

[[supplying-labels-to-the-build-container-task]]
== Supplying labels to the build-container task with the LABELS param
Expand Down Expand Up @@ -132,3 +128,23 @@ tasks:
- $(tasks.generate-labels.results.labels[*])
...
----

[[combining-approaches]]
== Combining approaches

You can combine the approaches described above and supply a list of labels to the build-container task constructed from multiple sources.

[source,yaml]
----
tasks:
...
- name: build-container
...
params:
...
- name: LABELS
value:
- $(tasks.generate-labels.results.labels[*])
- "short-commit=$(tasks.clone-repository.results.short-commit)"
...
----

0 comments on commit e48bdce

Please sign in to comment.