@@ -4,11 +4,30 @@ metadata:
44 annotations :
55 build.appstudio.openshift.io/repo : https://github.com/stackrox/stackrox-mcp?rev={{revision}}
66 build.appstudio.redhat.com/commit_sha : ' {{revision}}'
7+ build.appstudio.redhat.com/pull_request_number : ' {{pull_request_number}}'
78 build.appstudio.redhat.com/target_branch : ' {{target_branch}}'
8- pipelinesascode.tekton.dev/cancel-in-progress : " false"
9- pipelinesascode.tekton.dev/max-keep-runs : " 3"
10- pipelinesascode.tekton.dev/on-cel-expression : event == "push" && target_branch
11- == "main"
9+ pipelinesascode.tekton.dev/max-keep-runs : " 10"
10+ pipelinesascode.tekton.dev/on-label : " []"
11+ # For push trigger:
12+ # - trigger on commit push on main or release branch.
13+ # - trigger on tag pushes.
14+ # For PR triggers:
15+ # - body.action != "ready_for_review" prevents double-triggering when a draft PR is marked ready for review.
16+ # - trigger only for PRs on release branches.
17+ # - support triggering by label: "konflux-build"
18+ pipelinesascode.tekton.dev/on-cel-expression : |
19+ (
20+ event == "push" && target_branch.matches("^(main|release-.*|refs/tags/.*)$")
21+ ) || (
22+ event == "pull_request" && body.action != "ready_for_review" && (
23+ target_branch.startsWith("release-") ||
24+ (
25+ has(body.pull_request) &&
26+ has(body.pull_request.labels) &&
27+ body.pull_request.labels.exists(l, l.name == "konflux-build")
28+ )
29+ )
30+ )
1231 labels :
1332 appstudio.openshift.io/application : acs-mcp
1433 appstudio.openshift.io/component : acs-mcp-server
0 commit comments