Skip to content

Commit e5581b6

Browse files
author
serverless-qe
committed
[release-1.35] Sync Konflux configurations
1 parent 1f3f1f1 commit e5581b6

25 files changed

Lines changed: 252 additions & 260 deletions

.tekton/bundle-build.yaml

Lines changed: 97 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apiVersion: tekton.dev/v1
22
kind: Pipeline
33
metadata:
4-
creationTimestamp:
54
labels:
65
pipelines.openshift.io/runtime: generic
76
pipelines.openshift.io/strategy: docker
@@ -11,23 +10,13 @@ spec:
1110
description: |
1211
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
1312
14-
_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://enterprisecontract.dev/docs/ec-policies/release_policy.html#trusted_task__trusted) policy as long as all data used to build the artifact is generated from trusted tasks.
13+
_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:86c069cac0a669797e8049faa8aa4088e70ff7fcd579d5bdc37626a9e0488a05
27-
- name: kind
28-
value: task
29-
resolver: bundles
3015
params:
16+
- default: "false"
17+
description: Add built image into an OCI image index
18+
name: build-image-index
19+
type: string
3120
- default: --all-projects --org=3e1a4cca-ebfb-495f-b64c-3cc960d566b4 --exclude=test*,vendor,third_party
3221
description: Append arguments to Snyk code command.
3322
name: snyk-args
@@ -37,7 +26,8 @@ spec:
3726
name: build-source-image
3827
type: string
3928
- default: "false"
40-
description: 'Enable in-development package managers. WARNING: the behavior may change at any time without notice. Use at your own risk.'
29+
description: 'Enable in-development package managers. WARNING: the behavior may
30+
change at any time without notice. Use at your own risk.'
4131
name: prefetch-input-dev-package-managers
4232
- default: []
4333
description: Additional image tags
@@ -54,17 +44,15 @@ spec:
5444
name: output-image
5545
type: string
5646
- default: .
57-
description: Path to the source code of an application's component from where to build image.
47+
description: Path to the source code of an application's component from where
48+
to build image.
5849
name: path-context
5950
type: string
6051
- default: Dockerfile
61-
description: Path to the Dockerfile inside the context specified by parameter path-context
52+
description: Path to the Dockerfile inside the context specified by parameter
53+
path-context
6254
name: dockerfile
6355
type: string
64-
- default: "false"
65-
description: Force rebuild image
66-
name: rebuild
67-
type: string
6856
- default: "false"
6957
description: Skip checks against built image
7058
name: skip-checks
@@ -74,16 +62,22 @@ spec:
7462
name: hermetic
7563
type: string
7664
- default: ""
77-
description: Build dependencies to be prefetched by Cachi2
65+
description: Build dependencies to be prefetched
7866
name: prefetch-input
7967
type: string
8068
- default: ""
81-
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
69+
description: Image tag expiration time, time values could be something like 1h,
70+
2d, 3w for hours, days, and weeks, respectively.
8271
name: image-expires-after
83-
- default: "true"
84-
description: Add built image into an OCI image index
85-
name: build-image-index
8672
type: string
73+
- default: docker
74+
description: The format for the resulting image's mediaType. Valid values are
75+
oci or docker.
76+
name: buildah-format
77+
type: string
78+
- default: "false"
79+
description: Enable cache proxy configuration
80+
name: enable-cache-proxy
8781
- default: []
8882
description: Array of --build-arg values ("arg=value" strings) for buildah
8983
name: build-args
@@ -93,12 +87,14 @@ spec:
9387
name: build-args-file
9488
type: string
9589
- default: "false"
96-
description: Whether to enable privileged mode, should be used only with remote VMs
90+
description: Whether to enable privileged mode, should be used only with remote
91+
VMs
9792
name: privileged-nested
9893
type: string
9994
- default:
10095
- linux/x86_64
101-
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.
96+
description: List of platforms to build the container images on. The available
97+
set of values is determined by the configuration of the multi-platform-controller.
10298
name: build-platforms
10399
type: array
104100
results:
@@ -115,6 +111,59 @@ spec:
115111
name: CHAINS-GIT_COMMIT
116112
value: $(tasks.clone-repository.results.commit)
117113
tasks:
114+
- matrix:
115+
params:
116+
- name: PLATFORM
117+
value:
118+
- $(params.build-platforms)
119+
name: build-images
120+
params:
121+
- name: IMAGE_APPEND_PLATFORM
122+
value: "false"
123+
- name: IMAGE
124+
value: $(params.output-image)
125+
- name: DOCKERFILE
126+
value: $(params.dockerfile)
127+
- name: CONTEXT
128+
value: $(params.path-context)
129+
- name: HERMETIC
130+
value: $(params.hermetic)
131+
- name: PREFETCH_INPUT
132+
value: $(params.prefetch-input)
133+
- name: IMAGE_EXPIRES_AFTER
134+
value: $(params.image-expires-after)
135+
- name: COMMIT_SHA
136+
value: $(tasks.clone-repository.results.commit)
137+
- name: BUILD_ARGS
138+
value:
139+
- $(params.build-args[*])
140+
- name: BUILD_ARGS_FILE
141+
value: $(params.build-args-file)
142+
- name: PRIVILEGED_NESTED
143+
value: $(params.privileged-nested)
144+
- name: SOURCE_URL
145+
value: $(tasks.clone-repository.results.url)
146+
- name: BUILDAH_FORMAT
147+
value: $(params.buildah-format)
148+
- name: HTTP_PROXY
149+
value: $(tasks.init.results.http-proxy)
150+
- name: NO_PROXY
151+
value: $(tasks.init.results.no-proxy)
152+
- name: SOURCE_ARTIFACT
153+
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
154+
- name: CACHI2_ARTIFACT
155+
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
156+
runAfter:
157+
- prefetch-dependencies
158+
taskRef:
159+
params:
160+
- name: name
161+
value: buildah-remote-oci-ta
162+
- name: bundle
163+
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.4@sha256:9e866d4d0489a6ab84ae263db416c9f86d2d6117ef4444f495a0e97388ae3ac0
164+
- name: kind
165+
value: task
166+
resolver: bundles
118167
- name: sast-snyk-check
119168
params:
120169
- name: ARGS
@@ -192,12 +241,8 @@ spec:
192241
resolver: bundles
193242
- name: init
194243
params:
195-
- name: image-url
196-
value: $(params.output-image)
197-
- name: rebuild
198-
value: $(params.rebuild)
199-
- name: skip-checks
200-
value: $(params.skip-checks)
244+
- name: enable-cache-proxy
245+
value: $(params.enable-cache-proxy)
201246
taskRef:
202247
params:
203248
- name: name
@@ -228,64 +273,9 @@ spec:
228273
- name: kind
229274
value: task
230275
resolver: bundles
231-
when:
232-
- input: $(tasks.init.results.build)
233-
operator: in
234-
values:
235-
- "true"
236276
workspaces:
237277
- name: basic-auth
238278
workspace: git-auth
239-
- matrix:
240-
params:
241-
- name: PLATFORM
242-
value:
243-
- $(params.build-platforms)
244-
name: build-images
245-
params:
246-
- name: IMAGE
247-
value: $(params.output-image)
248-
- name: DOCKERFILE
249-
value: $(params.dockerfile)
250-
- name: CONTEXT
251-
value: $(params.path-context)
252-
- name: HERMETIC
253-
value: $(params.hermetic)
254-
- name: PREFETCH_INPUT
255-
value: $(params.prefetch-input)
256-
- name: IMAGE_EXPIRES_AFTER
257-
value: $(params.image-expires-after)
258-
- name: COMMIT_SHA
259-
value: $(tasks.clone-repository.results.commit)
260-
- name: BUILD_ARGS
261-
value:
262-
- $(params.build-args[*])
263-
- name: BUILD_ARGS_FILE
264-
value: $(params.build-args-file)
265-
- name: PRIVILEGED_NESTED
266-
value: $(params.privileged-nested)
267-
- name: SOURCE_ARTIFACT
268-
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
269-
- name: CACHI2_ARTIFACT
270-
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
271-
- name: IMAGE_APPEND_PLATFORM
272-
value: "true"
273-
runAfter:
274-
- prefetch-dependencies
275-
taskRef:
276-
params:
277-
- name: name
278-
value: buildah-remote-oci-ta
279-
- name: bundle
280-
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.4@sha256:9e866d4d0489a6ab84ae263db416c9f86d2d6117ef4444f495a0e97388ae3ac0
281-
- name: kind
282-
value: task
283-
resolver: bundles
284-
when:
285-
- input: $(tasks.init.results.build)
286-
operator: in
287-
values:
288-
- "true"
289279
- name: build-image-index
290280
params:
291281
- name: IMAGE
@@ -299,6 +289,8 @@ spec:
299289
- name: IMAGES
300290
value:
301291
- $(tasks.build-images.results.IMAGE_REF[*])
292+
- name: BUILDAH_FORMAT
293+
value: $(params.buildah-format)
302294
runAfter:
303295
- build-images
304296
taskRef:
@@ -310,21 +302,16 @@ spec:
310302
- name: kind
311303
value: task
312304
resolver: bundles
313-
when:
314-
- input: $(tasks.init.results.build)
315-
operator: in
316-
values:
317-
- "true"
318305
- name: build-source-image
319306
params:
320307
- name: BINARY_IMAGE
321308
value: $(tasks.build-image-index.results.IMAGE_URL)
309+
- name: BINARY_IMAGE_DIGEST
310+
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
322311
- name: SOURCE_ARTIFACT
323312
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
324313
- name: CACHI2_ARTIFACT
325314
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
326-
- name: BINARY_IMAGE_DIGEST
327-
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
328315
runAfter:
329316
- build-image-index
330317
taskRef:
@@ -337,10 +324,6 @@ spec:
337324
value: task
338325
resolver: bundles
339326
when:
340-
- input: $(tasks.init.results.build)
341-
operator: in
342-
values:
343-
- "true"
344327
- input: $(params.build-source-image)
345328
operator: in
346329
values:
@@ -367,7 +350,12 @@ spec:
367350
operator: in
368351
values:
369352
- "false"
370-
- name: clair-scan
353+
- matrix:
354+
params:
355+
- name: image-platform
356+
value:
357+
- $(params.build-platforms)
358+
name: clair-scan
371359
params:
372360
- name: image-digest
373361
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
@@ -389,7 +377,12 @@ spec:
389377
operator: in
390378
values:
391379
- "false"
392-
- name: clamav-scan
380+
- matrix:
381+
params:
382+
- name: image-arch
383+
value:
384+
- $(params.build-platforms)
385+
name: clamav-scan
393386
params:
394387
- name: image-digest
395388
value: $(tasks.build-image-index.results.IMAGE_DIGEST)

0 commit comments

Comments
 (0)