26
26
value : ' {{source_url}}'
27
27
- name : revision
28
28
value : ' {{revision}}'
29
- - name : output-image
30
- value : quay.io/rhacs-eng/konflux-tasks:rev-{{revision}}
29
+ - name : output-image-repo
30
+ value : quay.io/rhacs-eng/konflux-tasks
31
+ - name : output-image-tag
32
+ value : rev-{{revision}}
33
+ - name : output-trust-data-repo
34
+ value : quay.io/rhacs-eng/konflux-tasks-trust
31
35
- name : rebuild
32
36
value : " true"
33
37
- name : build-source-image
50
54
description : Revision of the Source Repository
51
55
name : revision
52
56
type : string
53
- - description : Fully Qualified Output Image
54
- name : output-image
57
+ - description : Repository of the output image
58
+ name : output-image-repo
59
+ type : string
60
+ - description : Unique tag of the output image
61
+ name : output-image-tag
62
+ type : string
63
+ - description : Image repository where to update data about tasks trust
64
+ name : output-trust-data-repo
55
65
type : string
56
66
- default : .
57
67
description : Path to the source code of an application's component from where
@@ -111,7 +121,7 @@ spec:
111
121
- name : slack-notification
112
122
params :
113
123
- name : message
114
- value : ' :x: `{{event_type}}` pipeline for <https://console.redhat.com/application-pipeline/workspaces/rh-acs/applications/acs/pipelineruns/$(context.pipelineRun.name)|$(context.pipelineRun.name)> (`$(params.output-image)`, revision <$(params.git-url)/commit/$(params.revision)|$(params.revision)>) has failed.'
124
+ value : ' :x: `{{event_type}}` pipeline for <https://console.redhat.com/application-pipeline/workspaces/rh-acs/applications/acs/pipelineruns/$(context.pipelineRun.name)|$(context.pipelineRun.name)> (`$(params.output-image-repo )`, revision <$(params.git-url)/commit/$(params.revision)|$(params.revision)>) has failed.'
115
125
- name : key-name
116
126
value : ' acs-konflux-notifications'
117
127
when :
@@ -148,7 +158,7 @@ spec:
148
158
- name : init
149
159
params :
150
160
- name : image-url
151
- value : $(params.output-image)
161
+ value : $(params.output-image-repo):$(params.output-image-tag )
152
162
- name : rebuild
153
163
value : $(params.rebuild)
154
164
- name : skip-checks
@@ -170,7 +180,7 @@ spec:
170
180
- name : revision
171
181
value : $(params.revision)
172
182
- name : ociStorage
173
- value : $(params.output-image).git
183
+ value : $(params.output-image-repo):$(params.output-image-tag ).git
174
184
- name : ociArtifactExpiresAfter
175
185
value : $(params.oci-artifact-expires-after)
176
186
taskRef :
@@ -197,7 +207,7 @@ spec:
197
207
- name : SOURCE_ARTIFACT
198
208
value : $(tasks.clone-repository.results.SOURCE_ARTIFACT)
199
209
- name : ociStorage
200
- value : $(params.output-image).prefetch
210
+ value : $(params.output-image-repo):$(params.output-image-tag ).prefetch
201
211
- name : ociArtifactExpiresAfter
202
212
value : $(params.oci-artifact-expires-after)
203
213
taskRef :
@@ -218,7 +228,7 @@ spec:
218
228
- name : build-container
219
229
params :
220
230
- name : IMAGE
221
- value : $(params.output-image)
231
+ value : $(params.output-image-repo):$(params.output-image-tag )
222
232
- name : CONTEXT
223
233
value : $(params.path-context)
224
234
- name : SOURCE_ARTIFACT
@@ -240,7 +250,7 @@ spec:
240
250
- name : build-image-index
241
251
params :
242
252
- name : IMAGE
243
- value : $(params.output-image)
253
+ value : $(params.output-image-repo):$(params.output-image-tag )
244
254
- name : COMMIT_SHA
245
255
value : $(tasks.clone-repository.results.commit)
246
256
- name : IMAGE_EXPIRES_AFTER
@@ -516,3 +526,29 @@ spec:
516
526
- input : $(params.skip-checks)
517
527
operator : in
518
528
values : [ "false" ]
529
+
530
+ - name : update-tasks-trust
531
+ description : Updates the image which allows to trust built tasks in EC.
532
+ params :
533
+ - name : TASKS_IMAGE
534
+ value : $(params.output-image-repo):$(tasks.get-floating-tag.results.FLOATING_TAG)@$(tasks.build-image-index.results.IMAGE_DIGEST)
535
+ - name : OUTPUT_IMAGE
536
+ value : $(params.output-trust-data-repo):$(tasks.get-floating-tag.results.FLOATING_TAG)
537
+ taskSpec :
538
+ params :
539
+ - name : TASKS_IMAGE
540
+ type : string
541
+ - name : OUTPUT_IMAGE
542
+ type : string
543
+ steps :
544
+ - name : update-tasks-trust
545
+ image : quay.io/konflux-ci/appstudio-utils:latest@sha256:5c77fe44dfd9615b1ba854e27e4ae2583146599eb4021ca8bd4662d2ba3ffa14
546
+ script : |
547
+ #!/usr/bin/env bash
548
+ set -euo pipefail
549
+
550
+ ec --debug track bundle --freshen \
551
+ --bundle "$(params.TASKS_IMAGE)" \
552
+ --input "oci:$(params.OUTPUT_IMAGE)" --replace
553
+
554
+ echo "Done"
0 commit comments