11apiVersion : tekton.dev/v1
22kind : Pipeline
33metadata :
4- creationTimestamp :
54 labels :
65 pipelines.openshift.io/runtime : generic
76 pipelines.openshift.io/strategy : docker
@@ -13,27 +12,14 @@ spec:
1312
1413 _Uses `buildah` to create a multi-platform container image leveraging [trusted artifacts](https://konflux-ci.dev/architecture/ADR/0036-trusted-artifacts.html). It also optionally creates a source image and runs some build-time tests. This pipeline requires that the [multi platform controller](https://github.com/konflux-ci/multi-platform-controller) is deployed and configured on your Konflux instance. Information is shared between tasks using OCI artifacts instead of PVCs. EC will pass the [`trusted_task.trusted`](https://conforma.dev/docs/policy/packages/release_trusted_task.html#trusted_task__trusted) policy as long as all data used to build the artifact is generated from trusted tasks.
1514 This pipeline is pushed as a Tekton bundle to [quay.io](https://quay.io/repository/konflux-ci/tekton-catalog/pipeline-docker-build-multi-platform-oci-ta?tab=tags)_
16- finally :
17- - name : show-sbom
18- params :
19- - name : IMAGE_URL
20- value : $(tasks.build-image-index.results.IMAGE_URL)
21- taskRef :
22- params :
23- - name : name
24- value : show-sbom
25- - name : bundle
26- value : quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:beb0616db051952b4b861dd8c3e00fa1c0eccbd926feddf71194d3bb3ace9ce7
27- - name : kind
28- value : task
29- resolver : bundles
3015 params :
3116 - default :
3217 - linux/x86_64
3318 - linux/arm64
3419 - linux/ppc64le
3520 - linux/s390x
36- description : List of platforms to build the container images on. The available set of values is determined by the configuration of the multi-platform-controller.
21+ description : List of platforms to build the container images on. The available
22+ set of values is determined by the configuration of the multi-platform-controller.
3723 name : build-platforms
3824 type : array
3925 - default : --all-projects --org=3e1a4cca-ebfb-495f-b64c-3cc960d566b4 --exclude=test*,vendor,third_party
4531 name : build-source-image
4632 type : string
4733 - default : " false"
48- description : ' Enable in-development package managers. WARNING: the behavior may change at any time without notice. Use at your own risk.'
34+ description : ' Enable in-development package managers. WARNING: the behavior may
35+ change at any time without notice. Use at your own risk.'
4936 name : prefetch-input-dev-package-managers
5037 - default : []
5138 description : Additional image tags
@@ -62,17 +49,15 @@ spec:
6249 name : output-image
6350 type : string
6451 - default : .
65- description : Path to the source code of an application's component from where to build image.
52+ description : Path to the source code of an application's component from where
53+ to build image.
6654 name : path-context
6755 type : string
6856 - default : Dockerfile
69- description : Path to the Dockerfile inside the context specified by parameter path-context
57+ description : Path to the Dockerfile inside the context specified by parameter
58+ path-context
7059 name : dockerfile
7160 type : string
72- - default : " false"
73- description : Force rebuild image
74- name : rebuild
75- type : string
7661 - default : " false"
7762 description : Skip checks against built image
7863 name : skip-checks
@@ -82,17 +67,26 @@ spec:
8267 name : hermetic
8368 type : string
8469 - default : " "
85- description : Build dependencies to be prefetched by Cachi2
70+ description : Build dependencies to be prefetched
8671 name : prefetch-input
8772 type : string
8873 - default : " "
89- description : Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
74+ description : Image tag expiration time, time values could be something like 1h,
75+ 2d, 3w for hours, days, and weeks, respectively.
9076 name : image-expires-after
9177 type : string
9278 - default : " true"
9379 description : Add built image into an OCI image index
9480 name : build-image-index
9581 type : string
82+ - default : docker
83+ description : The format for the resulting image's mediaType. Valid values are
84+ oci or docker.
85+ name : buildah-format
86+ type : string
87+ - default : " false"
88+ description : Enable cache proxy configuration
89+ name : enable-cache-proxy
9690 - default : []
9791 description : Array of --build-arg values ("arg=value" strings) for buildah
9892 name : build-args
@@ -102,17 +96,10 @@ spec:
10296 name : build-args-file
10397 type : string
10498 - default : " false"
105- description : Whether to enable privileged mode, should be used only with remote VMs
99+ description : Whether to enable privileged mode, should be used only with remote
100+ VMs
106101 name : privileged-nested
107102 type : string
108- - name : buildah-format
109- default : docker
110- type : string
111- description : The format for the resulting image's mediaType. Valid values are oci or docker.
112- - name : enable-cache-proxy
113- default : ' false'
114- description : Enable cache proxy configuration
115- type : string
116103 results :
117104 - description : " "
118105 name : IMAGE_URL
@@ -204,12 +191,6 @@ spec:
204191 resolver : bundles
205192 - name : init
206193 params :
207- - name : image-url
208- value : $(params.output-image)
209- - name : rebuild
210- value : $(params.rebuild)
211- - name : skip-checks
212- value : $(params.skip-checks)
213194 - name : enable-cache-proxy
214195 value : $(params.enable-cache-proxy)
215196 taskRef :
@@ -242,11 +223,6 @@ spec:
242223 - name : kind
243224 value : task
244225 resolver : bundles
245- when :
246- - input : $(tasks.init.results.build)
247- operator : in
248- values :
249- - " true"
250226 workspaces :
251227 - name : basic-auth
252228 workspace : git-auth
@@ -278,18 +254,20 @@ spec:
278254 value : $(params.build-args-file)
279255 - name : PRIVILEGED_NESTED
280256 value : $(params.privileged-nested)
281- - name : SOURCE_ARTIFACT
282- value : $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
283- - name : CACHI2_ARTIFACT
284- value : $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
285- - name : IMAGE_APPEND_PLATFORM
286- value : " true"
257+ - name : SOURCE_URL
258+ value : $(tasks.clone-repository.results.url)
287259 - name : BUILDAH_FORMAT
288260 value : $(params.buildah-format)
289261 - name : HTTP_PROXY
290262 value : $(tasks.init.results.http-proxy)
291263 - name : NO_PROXY
292264 value : $(tasks.init.results.no-proxy)
265+ - name : SOURCE_ARTIFACT
266+ value : $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
267+ - name : CACHI2_ARTIFACT
268+ value : $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
269+ - name : IMAGE_APPEND_PLATFORM
270+ value : " true"
293271 runAfter :
294272 - prefetch-dependencies
295273 taskRef :
@@ -301,11 +279,6 @@ spec:
301279 - name : kind
302280 value : task
303281 resolver : bundles
304- when :
305- - input : $(tasks.init.results.build)
306- operator : in
307- values :
308- - " true"
309282 - name : build-image-index
310283 params :
311284 - name : IMAGE
@@ -332,11 +305,6 @@ spec:
332305 - name : kind
333306 value : task
334307 resolver : bundles
335- when :
336- - input : $(tasks.init.results.build)
337- operator : in
338- values :
339- - " true"
340308 - name : build-source-image
341309 params :
342310 - name : BINARY_IMAGE
@@ -359,10 +327,6 @@ spec:
359327 value : task
360328 resolver : bundles
361329 when :
362- - input : $(tasks.init.results.build)
363- operator : in
364- values :
365- - " true"
366330 - input : $(params.build-source-image)
367331 operator : in
368332 values :
@@ -416,7 +380,12 @@ spec:
416380 operator : in
417381 values :
418382 - " false"
419- - name : ecosystem-cert-preflight-checks
383+ - matrix :
384+ params :
385+ - name : platform
386+ value :
387+ - $(params.build-platforms)
388+ name : ecosystem-cert-preflight-checks
420389 params :
421390 - name : image-url
422391 value : $(tasks.build-image-index.results.IMAGE_URL)
0 commit comments