Skip to content

Commit 3c00e60

Browse files
vdemeestertekton-robot
authored andcommitted
fix: fix CEL expression and remove release-right-meow SA
Fix the on-cel-expression to use the correct CEL variables: - Use 'event' and 'target_branch' (not 'pac.target_branch' which is only available in {{ cel: }} param substitution, not in on-cel-expression matching) - Use 'target_branch' without 'refs/heads/' prefix (PAC strips it) - Use '|' literal block scalar instead of '>' folding to avoid trailing newline issues - Add 'event == "push"' for explicitness Also remove the release-right-meow ServiceAccount from both PipelineRuns. It is a leftover from the old EventListener-based release flow. All release secrets are mounted as workspaces, so the default SA is sufficient.
1 parent 66f8f28 commit 3c00e60

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.tekton/release-patch.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ metadata:
3232
spec:
3333
pipelineRef:
3434
name: operator-release
35-
taskRunTemplate:
36-
serviceAccountName: release-right-meow
3735
params:
3836
- name: package
3937
value: github.com/tektoncd/operator

.tekton/release.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,14 @@ metadata:
3232
# so the branch filter MUST be included in the CEL expression.
3333
pipelinesascode.tekton.dev/on-event: "[push]"
3434
pipelinesascode.tekton.dev/on-target-branch: "[refs/heads/release-v*]"
35-
pipelinesascode.tekton.dev/on-cel-expression: >
36-
has(body.created) && body.created == true &&
37-
pac.target_branch.startsWith("refs/heads/release-v")
35+
pipelinesascode.tekton.dev/on-cel-expression: |
36+
event == "push" && has(body.created) && body.created == true &&
37+
target_branch.startsWith("release-v")
3838
pipelinesascode.tekton.dev/pipeline: "tekton/operator-release-pipeline.yaml"
3939
pipelinesascode.tekton.dev/max-keep-runs: "5"
4040
spec:
4141
pipelineRef:
4242
name: operator-release
43-
taskRunTemplate:
44-
serviceAccountName: release-right-meow
4543
params:
4644
- name: package
4745
value: github.com/tektoncd/operator

0 commit comments

Comments
 (0)