Skip to content

Commit 95c9d51

Browse files
author
serverless-qe
committed
[release-v1.16] Sync Konflux configurations
1 parent 2251628 commit 95c9d51

File tree

2 files changed

+72
-58
lines changed

2 files changed

+72
-58
lines changed

.tekton/docker-build.yaml

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: tekton.dev/v1
22
kind: Pipeline
33
metadata:
4-
creationTimestamp:
4+
creationTimestamp: null
55
labels:
66
pipelines.openshift.io/runtime: generic
77
pipelines.openshift.io/strategy: docker
@@ -13,27 +13,14 @@ spec:
1313

1414
_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.
1515
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
3016
params:
3117
- default:
3218
- linux/x86_64
3319
- linux/arm64
3420
- linux/ppc64le
3521
- 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.
22+
description: List of platforms to build the container images on. The available
23+
set of values is determined by the configuration of the multi-platform-controller.
3724
name: build-platforms
3825
type: array
3926
- default: --all-projects --org=3e1a4cca-ebfb-495f-b64c-3cc960d566b4 --exclude=test*,vendor,third_party
@@ -45,7 +32,8 @@ spec:
4532
name: build-source-image
4633
type: string
4734
- default: "false"
48-
description: 'Enable in-development package managers. WARNING: the behavior may change at any time without notice. Use at your own risk.'
35+
description: 'Enable in-development package managers. WARNING: the behavior may
36+
change at any time without notice. Use at your own risk.'
4937
name: prefetch-input-dev-package-managers
5038
- default: []
5139
description: Additional image tags
@@ -62,11 +50,13 @@ spec:
6250
name: output-image
6351
type: string
6452
- default: .
65-
description: Path to the source code of an application's component from where to build image.
53+
description: Path to the source code of an application's component from where
54+
to build image.
6655
name: path-context
6756
type: string
6857
- default: Dockerfile
69-
description: Path to the Dockerfile inside the context specified by parameter path-context
58+
description: Path to the Dockerfile inside the context specified by parameter
59+
path-context
7060
name: dockerfile
7161
type: string
7262
- default: "false"
@@ -82,17 +72,23 @@ spec:
8272
name: hermetic
8373
type: string
8474
- default: ""
85-
description: Build dependencies to be prefetched by Cachi2
75+
description: Build dependencies to be prefetched
8676
name: prefetch-input
8777
type: string
8878
- default: ""
89-
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
79+
description: Image tag expiration time, time values could be something like 1h,
80+
2d, 3w for hours, days, and weeks, respectively.
9081
name: image-expires-after
9182
type: string
9283
- default: "true"
9384
description: Add built image into an OCI image index
9485
name: build-image-index
9586
type: string
87+
- default: docker
88+
description: The format for the resulting image's mediaType. Valid values are
89+
oci or docker.
90+
name: buildah-format
91+
type: string
9692
- default: []
9793
description: Array of --build-arg values ("arg=value" strings) for buildah
9894
name: build-args
@@ -102,13 +98,10 @@ spec:
10298
name: build-args-file
10399
type: string
104100
- default: "false"
105-
description: Whether to enable privileged mode, should be used only with remote VMs
101+
description: Whether to enable privileged mode, should be used only with remote
102+
VMs
106103
name: privileged-nested
107104
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.
112105
results:
113106
- description: ""
114107
name: IMAGE_URL
@@ -272,14 +265,16 @@ spec:
272265
value: $(params.build-args-file)
273266
- name: PRIVILEGED_NESTED
274267
value: $(params.privileged-nested)
268+
- name: SOURCE_URL
269+
value: $(tasks.clone-repository.results.url)
270+
- name: BUILDAH_FORMAT
271+
value: $(params.buildah-format)
275272
- name: SOURCE_ARTIFACT
276273
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
277274
- name: CACHI2_ARTIFACT
278275
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
279276
- name: IMAGE_APPEND_PLATFORM
280277
value: "true"
281-
- name: BUILDAH_FORMAT
282-
value: $(params.buildah-format)
283278
runAfter:
284279
- prefetch-dependencies
285280
taskRef:
@@ -379,7 +374,12 @@ spec:
379374
operator: in
380375
values:
381376
- "false"
382-
- name: clair-scan
377+
- matrix:
378+
params:
379+
- name: image-platform
380+
value:
381+
- $(params.build-platforms)
382+
name: clair-scan
383383
params:
384384
- name: image-digest
385385
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
@@ -401,7 +401,12 @@ spec:
401401
operator: in
402402
values:
403403
- "false"
404-
- name: ecosystem-cert-preflight-checks
404+
- matrix:
405+
params:
406+
- name: platform
407+
value:
408+
- $(params.build-platforms)
409+
name: ecosystem-cert-preflight-checks
405410
params:
406411
- name: image-url
407412
value: $(tasks.build-image-index.results.IMAGE_URL)

.tekton/docker-java-build.yaml

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: tekton.dev/v1
22
kind: Pipeline
33
metadata:
4-
creationTimestamp:
4+
creationTimestamp: null
55
labels:
66
pipelines.openshift.io/runtime: generic
77
pipelines.openshift.io/strategy: docker
@@ -13,27 +13,14 @@ spec:
1313

1414
_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.
1515
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
3016
params:
3117
- default:
3218
- linux/x86_64
3319
- linux/arm64
3420
- linux/ppc64le
3521
- 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.
22+
description: List of platforms to build the container images on. The available
23+
set of values is determined by the configuration of the multi-platform-controller.
3724
name: build-platforms
3825
type: array
3926
- default: --all-projects --org=3e1a4cca-ebfb-495f-b64c-3cc960d566b4 --exclude=test*,vendor,third_party
@@ -45,7 +32,8 @@ spec:
4532
name: build-source-image
4633
type: string
4734
- default: "false"
48-
description: 'Enable in-development package managers. WARNING: the behavior may change at any time without notice. Use at your own risk.'
35+
description: 'Enable in-development package managers. WARNING: the behavior may
36+
change at any time without notice. Use at your own risk.'
4937
name: prefetch-input-dev-package-managers
5038
- default: []
5139
description: Additional image tags
@@ -62,11 +50,13 @@ spec:
6250
name: output-image
6351
type: string
6452
- default: .
65-
description: Path to the source code of an application's component from where to build image.
53+
description: Path to the source code of an application's component from where
54+
to build image.
6655
name: path-context
6756
type: string
6857
- default: Dockerfile
69-
description: Path to the Dockerfile inside the context specified by parameter path-context
58+
description: Path to the Dockerfile inside the context specified by parameter
59+
path-context
7060
name: dockerfile
7161
type: string
7262
- default: "false"
@@ -82,17 +72,23 @@ spec:
8272
name: hermetic
8373
type: string
8474
- default: ""
85-
description: Build dependencies to be prefetched by Cachi2
75+
description: Build dependencies to be prefetched
8676
name: prefetch-input
8777
type: string
8878
- default: ""
89-
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
79+
description: Image tag expiration time, time values could be something like 1h,
80+
2d, 3w for hours, days, and weeks, respectively.
9081
name: image-expires-after
9182
type: string
9283
- default: "true"
9384
description: Add built image into an OCI image index
9485
name: build-image-index
9586
type: string
87+
- default: docker
88+
description: The format for the resulting image's mediaType. Valid values are
89+
oci or docker.
90+
name: buildah-format
91+
type: string
9692
- default: []
9793
description: Array of --build-arg values ("arg=value" strings) for buildah
9894
name: build-args
@@ -102,13 +98,10 @@ spec:
10298
name: build-args-file
10399
type: string
104100
- default: "false"
105-
description: Whether to enable privileged mode, should be used only with remote VMs
101+
description: Whether to enable privileged mode, should be used only with remote
102+
VMs
106103
name: privileged-nested
107104
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.
112105
results:
113106
- description: ""
114107
name: IMAGE_URL
@@ -229,6 +222,10 @@ spec:
229222
value: $(params.build-args-file)
230223
- name: PRIVILEGED_NESTED
231224
value: $(params.privileged-nested)
225+
- name: SOURCE_URL
226+
value: $(tasks.clone-repository.results.url)
227+
- name: BUILDAH_FORMAT
228+
value: $(params.buildah-format)
232229
- name: SOURCE_ARTIFACT
233230
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
234231
- name: CACHI2_ARTIFACT
@@ -385,6 +382,8 @@ spec:
385382
- name: IMAGES
386383
value:
387384
- $(tasks.build-images.results.IMAGE_REF[*])
385+
- name: BUILDAH_FORMAT
386+
value: $(params.buildah-format)
388387
runAfter:
389388
- build-images
390389
taskRef:
@@ -453,7 +452,12 @@ spec:
453452
operator: in
454453
values:
455454
- "false"
456-
- name: clair-scan
455+
- matrix:
456+
params:
457+
- name: image-platform
458+
value:
459+
- $(params.build-platforms)
460+
name: clair-scan
457461
params:
458462
- name: image-digest
459463
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
@@ -475,7 +479,12 @@ spec:
475479
operator: in
476480
values:
477481
- "false"
478-
- name: ecosystem-cert-preflight-checks
482+
- matrix:
483+
params:
484+
- name: platform
485+
value:
486+
- $(params.build-platforms)
487+
name: ecosystem-cert-preflight-checks
479488
params:
480489
- name: image-url
481490
value: $(tasks.build-image-index.results.IMAGE_URL)

0 commit comments

Comments
 (0)