Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #264 from jameswnl/patch-1
Browse files Browse the repository at this point in the history
Update apply-tags example
  • Loading branch information
gtrivedi88 authored May 22, 2024
2 parents 54f652b + e3db651 commit 62013d9
Showing 1 changed file with 22 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,33 @@ You can also specify additional custom tags by using *ADDITIONAL_TAGS* array par
----
...
- name: apply-tags
params:
- name: IMAGE
value: $(tasks.build-container.results.IMAGE_URL)
- name: ADDITIONAL_TAGS
value: ["tag1", "tag2"]
runAfter:
- build-container
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/redhat-appstudio-tekton-catalog/task-apply-tags:0.1
- name: kind
value: task
resolver: bundles
...
----

The array parameter ADDITIONAL_TAGS can also be specified differently:

----
...
- name: apply-tags
params:
- name: IMAGE
value: $(tasks.build-container.results.IMAGE_URL)
- name: ADDITIONAL_TAGS
value:
- tag1
- tag2
runAfter:
- build-container
- name: ADDITIONAL_TAGS
value:
- tag1
- tag2
...
----

Expand All @@ -73,14 +76,8 @@ The provided tags can also be based on dynamic variables that are provided by Pi
----
...
- name: apply-tags
params:
- name: IMAGE
value: $(tasks.build-container.results.IMAGE_URL)
- name: ADDITIONAL_TAGS
value: ["pull-request-{{pull_request_number}}", "from-branch-{{source_branch}}", "{{target_branch}}"]
runAfter:
- build-container
- name: ADDITIONAL_TAGS
value: ["pull-request-{{pull_request_number}}", "from-branch-{{source_branch}}", "{{target_branch}}"]
...
----
Expand Down

0 comments on commit 62013d9

Please sign in to comment.