Skip to content

Commit b3692a8

Browse files
committed
konflux: avoid building the operator when manager.yaml is updated
We get automated PRs to update the digest of the images in our ClusterServiceVersion and in the manager.yaml file. These PRs are generated when one of the referenced images is updated. Now if modifying those files triggers another build, we can end up in a loop of builds/nudges. This commit makes sure that that operator is not rebuilt when such PRs are merged. Signed-off-by: Julien Ropé <[email protected]>
1 parent 6a6b54a commit b3692a8

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.tekton/osc-operator-pull-request.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ 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 == "devel" && files.all.exists(path, !path.matches('bundle*|.tekton/*bundle*')) && files.all.exists(path, !path.matches('must-gather*|.tekton/*must-gather*')) && files.all.exists(path, !path.matches('config/peerpods/podvm*|.tekton/*podvm-builder*')) && files.all.exists(path, !path.matches('.tekton/.*fbc-.*|fbc/.*'))
10+
pipelinesascode.tekton.dev/on-cel-expression: |
11+
event == "pull_request" &&
12+
target_branch == "devel" &&
13+
files.all.exists(path, !path.matches('bundle*|.tekton/*bundle*')) &&
14+
files.all.exists(path, !path.matches('must-gather*|.tekton/*must-gather*')) &&
15+
files.all.exists(path, !path.matches('config/peerpods/podvm*|.tekton/*podvm-builder*')) &&
16+
files.all.exists(path, !path.matches('.tekton/.*fbc-.*|fbc/.*')) &&
17+
files.all.exists(path, !path.matches('config/manager/*'))
1118
creationTimestamp:
1219
labels:
1320
appstudio.openshift.io/application: openshift-sandboxed-containers

.tekton/osc-operator-push.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ 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 == "devel" && files.all.exists(path, !path.matches('bundle*|.tekton/*bundle*')) && files.all.exists(path, !path.matches('must-gather*|.tekton/*must-gather*')) && files.all.exists(path, !path.matches('config/peerpods/podvm*|.tekton/*podvm-builder*')) && files.all.exists(path, !path.matches('.tekton/.*fbc-.*|fbc/.*'))
9+
pipelinesascode.tekton.dev/on-cel-expression: |
10+
event == "push" &&
11+
target_branch == "devel" &&
12+
files.all.exists(path, !path.matches('bundle*|.tekton/*bundle*')) &&
13+
files.all.exists(path, !path.matches('must-gather*|.tekton/*must-gather*')) &&
14+
files.all.exists(path, !path.matches('config/peerpods/podvm*|.tekton/*podvm-builder*')) &&
15+
files.all.exists(path, !path.matches('.tekton/.*fbc-.*|fbc/.*')) &&
16+
files.all.exists(path, !path.matches('config/manager/*'))
1017
creationTimestamp:
1118
labels:
1219
appstudio.openshift.io/application: openshift-sandboxed-containers

0 commit comments

Comments
 (0)