Skip to content

Commit 955debc

Browse files
author
konflux
committed
Konflux build pipeline service account migration for operator
Signed-off-by: konflux <konflux@no-reply.konflux-ci.dev>
1 parent a7d406e commit 955debc

2 files changed

Lines changed: 34 additions & 22 deletions

File tree

.tekton/operator-pull-request.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ metadata:
77
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
88
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
99
pipelinesascode.tekton.dev/max-keep-runs: "3"
10-
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main"
10+
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
11+
== "main"
1112
creationTimestamp: null
1213
labels:
1314
appstudio.openshift.io/application: patterns-operator
@@ -78,11 +79,13 @@ spec:
7879
name: output-image
7980
type: string
8081
- default: .
81-
description: Path to the source code of an application's component from where to build image.
82+
description: Path to the source code of an application's component from where
83+
to build image.
8284
name: path-context
8385
type: string
8486
- default: Dockerfile
85-
description: Path to the Dockerfile inside the context specified by parameter path-context
87+
description: Path to the Dockerfile inside the context specified by parameter
88+
path-context
8689
name: dockerfile
8790
type: string
8891
- default: "false"
@@ -106,14 +109,16 @@ spec:
106109
name: java
107110
type: string
108111
- default: ""
109-
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
112+
description: Image tag expiration time, time values could be something like
113+
1h, 2d, 3w for hours, days, and weeks, respectively.
110114
name: image-expires-after
111115
- default: "false"
112116
description: Build a source image.
113117
name: build-source-image
114118
type: string
115119
- default: ""
116-
description: Path to a file with build arguments which will be passed to podman during build
120+
description: Path to a file with build arguments which will be passed to podman
121+
during build
117122
name: build-args-file
118123
type: string
119124
results:
@@ -328,6 +333,11 @@ spec:
328333
values:
329334
- "false"
330335
- name: sast-snyk-check
336+
params:
337+
- name: image-digest
338+
value: $(tasks.build-container.results.IMAGE_DIGEST)
339+
- name: image-url
340+
value: $(tasks.build-container.results.IMAGE_URL)
331341
runAfter:
332342
- build-container
333343
taskRef:
@@ -347,11 +357,6 @@ spec:
347357
workspaces:
348358
- name: workspace
349359
workspace: workspace
350-
params:
351-
- name: image-digest
352-
value: $(tasks.build-container.results.IMAGE_DIGEST)
353-
- name: image-url
354-
value: $(tasks.build-container.results.IMAGE_URL)
355360
- name: clamav-scan
356361
params:
357362
- name: image-digest
@@ -378,7 +383,8 @@ spec:
378383
- name: workspace
379384
- name: git-auth
380385
optional: true
381-
taskRunTemplate: {}
386+
taskRunTemplate:
387+
serviceAccountName: build-pipeline-operator
382388
workspaces:
383389
- name: workspace
384390
volumeClaimTemplate:

.tekton/operator-push.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ metadata:
66
build.appstudio.redhat.com/commit_sha: '{{revision}}'
77
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
88
pipelinesascode.tekton.dev/max-keep-runs: "3"
9-
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main"
9+
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
10+
== "main"
1011
creationTimestamp: null
1112
labels:
1213
appstudio.openshift.io/application: patterns-operator
@@ -75,11 +76,13 @@ spec:
7576
name: output-image
7677
type: string
7778
- default: .
78-
description: Path to the source code of an application's component from where to build image.
79+
description: Path to the source code of an application's component from where
80+
to build image.
7981
name: path-context
8082
type: string
8183
- default: Dockerfile
82-
description: Path to the Dockerfile inside the context specified by parameter path-context
84+
description: Path to the Dockerfile inside the context specified by parameter
85+
path-context
8386
name: dockerfile
8487
type: string
8588
- default: "false"
@@ -103,14 +106,16 @@ spec:
103106
name: java
104107
type: string
105108
- default: ""
106-
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
109+
description: Image tag expiration time, time values could be something like
110+
1h, 2d, 3w for hours, days, and weeks, respectively.
107111
name: image-expires-after
108112
- default: "false"
109113
description: Build a source image.
110114
name: build-source-image
111115
type: string
112116
- default: ""
113-
description: Path to a file with build arguments which will be passed to podman during build
117+
description: Path to a file with build arguments which will be passed to podman
118+
during build
114119
name: build-args-file
115120
type: string
116121
results:
@@ -325,6 +330,11 @@ spec:
325330
values:
326331
- "false"
327332
- name: sast-snyk-check
333+
params:
334+
- name: image-digest
335+
value: $(tasks.build-container.results.IMAGE_DIGEST)
336+
- name: image-url
337+
value: $(tasks.build-container.results.IMAGE_URL)
328338
runAfter:
329339
- build-container
330340
taskRef:
@@ -344,11 +354,6 @@ spec:
344354
workspaces:
345355
- name: workspace
346356
workspace: workspace
347-
params:
348-
- name: image-digest
349-
value: $(tasks.build-container.results.IMAGE_DIGEST)
350-
- name: image-url
351-
value: $(tasks.build-container.results.IMAGE_URL)
352357
- name: clamav-scan
353358
params:
354359
- name: image-digest
@@ -375,7 +380,8 @@ spec:
375380
- name: workspace
376381
- name: git-auth
377382
optional: true
378-
taskRunTemplate: {}
383+
taskRunTemplate:
384+
serviceAccountName: build-pipeline-operator
379385
workspaces:
380386
- name: workspace
381387
volumeClaimTemplate:

0 commit comments

Comments
 (0)