Skip to content

Commit b30e63f

Browse files
author
konflux
committed
Konflux build pipeline service account migration for odh-codeflare-operator-v2-13
Signed-off-by: konflux <konflux@no-reply.konflux-ci.dev>
1 parent 8679c4a commit b30e63f

File tree

2 files changed

+36
-25
lines changed

2 files changed

+36
-25
lines changed

.tekton/odh-codeflare-operator-v2-13-pull-request.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ 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 == "rhoai-2.13" && !matches(source_branch, "^konflux/references") && !matches(source_branch, "^konflux/component-updates")
11-
creationTimestamp:
10+
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
11+
== "rhoai-2.13" && !matches(source_branch, "^konflux/references") && !matches(source_branch,
12+
"^konflux/component-updates")
13+
creationTimestamp: null
1214
labels:
1315
appstudio.openshift.io/application: rhoai-v2-13
1416
appstudio.openshift.io/component: odh-codeflare-operator-v2-13
@@ -63,11 +65,13 @@ spec:
6365
name: output-image
6466
type: string
6567
- default: .
66-
description: Path to the source code of an application's component from where to build image.
68+
description: Path to the source code of an application's component from where
69+
to build image.
6770
name: path-context
6871
type: string
6972
- default: Dockerfile
70-
description: Path to the Dockerfile inside the context specified by parameter path-context
73+
description: Path to the Dockerfile inside the context specified by parameter
74+
path-context
7175
name: dockerfile
7276
type: string
7377
- default: "false"
@@ -87,7 +91,8 @@ spec:
8791
name: prefetch-input
8892
type: string
8993
- default: ""
90-
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
94+
description: Image tag expiration time, time values could be something like
95+
1h, 2d, 3w for hours, days, and weeks, respectively.
9196
name: image-expires-after
9297
- default: "false"
9398
description: Build a source image.
@@ -468,7 +473,8 @@ spec:
468473
optional: true
469474
- name: netrc
470475
optional: true
471-
taskRunTemplate: {}
476+
taskRunTemplate:
477+
serviceAccountName: build-pipeline-odh-codeflare-operator-v2-13
472478
workspaces:
473479
- name: git-auth
474480
secret:

.tekton/odh-codeflare-operator-v2-13-push.yaml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
# comment for dummy trigger
21
apiVersion: tekton.dev/v1
32
kind: PipelineRun
43
metadata:
54
annotations:
5+
build.appstudio.openshift.io/build-nudge-files: build/operator-nudging.yaml
66
build.appstudio.openshift.io/repo: https://github.com/red-hat-data-services/codeflare-operator?rev={{revision}}
77
build.appstudio.redhat.com/commit_sha: '{{revision}}'
88
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
99
pipelinesascode.tekton.dev/max-keep-runs: "3"
10-
build.appstudio.openshift.io/build-nudge-files: "build/operator-nudging.yaml"
11-
pipelinesascode.tekton.dev/on-cel-expression: |
12-
event == "push"
13-
&& target_branch == "rhoai-2.13"
14-
&& ( !".tekton/**".pathChanged() || ".tekton/odh-codeflare-operator-v2-13-push.yaml".pathChanged() )
15-
creationTimestamp:
10+
pipelinesascode.tekton.dev/on-cel-expression: "event == \"push\" \n&& target_branch
11+
== \"rhoai-2.13\"\n&& ( !\".tekton/**\".pathChanged() || \".tekton/odh-codeflare-operator-v2-13-push.yaml\".pathChanged()
12+
)\n"
13+
creationTimestamp: null
1614
labels:
1715
appstudio.openshift.io/application: rhoai-v2-13
1816
appstudio.openshift.io/component: odh-codeflare-operator-v2-13
@@ -56,7 +54,7 @@ spec:
5654
- name: send-slack-notification
5755
params:
5856
- name: message
59-
value: "$(tasks.rhoai-init.results.slack-message-failure-text)"
57+
value: $(tasks.rhoai-init.results.slack-message-failure-text)
6058
- name: secret-name
6159
value: rhoai-konflux-secret
6260
- name: key-name
@@ -74,7 +72,7 @@ spec:
7472
- input: $(tasks.status)
7573
operator: in
7674
values:
77-
- "Failed"
75+
- Failed
7876
params:
7977
- description: Source Repository URL
8078
name: git-url
@@ -87,11 +85,13 @@ spec:
8785
name: output-image
8886
type: string
8987
- default: .
90-
description: Path to the source code of an application's component from where to build image.
88+
description: Path to the source code of an application's component from where
89+
to build image.
9190
name: path-context
9291
type: string
9392
- default: Dockerfile
94-
description: Path to the Dockerfile inside the context specified by parameter path-context
93+
description: Path to the Dockerfile inside the context specified by parameter
94+
path-context
9595
name: dockerfile
9696
type: string
9797
- default: "false"
@@ -111,7 +111,8 @@ spec:
111111
name: prefetch-input
112112
type: string
113113
- default: ""
114-
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
114+
description: Image tag expiration time, time values could be something like
115+
1h, 2d, 3w for hours, days, and weeks, respectively.
115116
name: image-expires-after
116117
- default: "true"
117118
description: Build a source image.
@@ -146,20 +147,23 @@ spec:
146147
- name: rhoai-init
147148
params:
148149
- name: pipelinerun-name
149-
value: "$(context.pipelineRun.name)"
150+
value: $(context.pipelineRun.name)
150151
taskSpec:
152+
metadata: {}
151153
results:
152154
- description: Notification text to be posted to slack
153155
name: slack-message-failure-text
156+
spec: null
154157
steps:
155-
- image: quay.io/rhoai-konflux/alpine:latest
156-
name: rhoai-init
158+
- computeResources: {}
157159
env:
158160
- name: slack_message
159161
valueFrom:
160162
secretKeyRef:
161-
name: rhoai-konflux-secret
162163
key: slack-component-failure-notification
164+
name: rhoai-konflux-secret
165+
image: quay.io/rhoai-konflux/alpine:latest
166+
name: rhoai-init
163167
script: |
164168
pipelinerun_name=$(params.pipelinerun-name)
165169
target_branch={{target_branch}}
@@ -190,6 +194,8 @@ spec:
190194
value: $(params.rebuild)
191195
- name: skip-checks
192196
value: $(params.skip-checks)
197+
runAfter:
198+
- rhoai-init
193199
taskRef:
194200
params:
195201
- name: name
@@ -199,8 +205,6 @@ spec:
199205
- name: kind
200206
value: task
201207
resolver: bundles
202-
runAfter:
203-
- rhoai-init
204208
- name: clone-repository
205209
params:
206210
- name: url
@@ -544,7 +548,8 @@ spec:
544548
optional: true
545549
- name: netrc
546550
optional: true
547-
taskRunTemplate: {}
551+
taskRunTemplate:
552+
serviceAccountName: build-pipeline-odh-codeflare-operator-v2-13
548553
workspaces:
549554
- name: git-auth
550555
secret:

0 commit comments

Comments
 (0)