Skip to content

Commit

Permalink
ROX-26784: Don't trigger Konflux builds against release branches (#1705)
Browse files Browse the repository at this point in the history
Also trigger builds when tags are pushed.
  • Loading branch information
kylape authored Nov 15, 2024
1 parent 83e994b commit ff7e0f3
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 12 deletions.
14 changes: 11 additions & 3 deletions .tekton/scanner-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
pipelinesascode.tekton.dev/on-cel-expression: (
event == "push" && (
source_branch == "master" ||
target_branch.startsWith("refs/tags/")
)
) || (
event == "pull_request" && (
source_branch.matches("(konflux|renovate|appstudio|rhtap)") ||
body.pull_request.labels.exists(l, l.name == "konflux-build")
)
)
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner
Expand Down
14 changes: 11 additions & 3 deletions .tekton/scanner-db-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
pipelinesascode.tekton.dev/on-cel-expression: (
event == "push" && (
source_branch == "master" ||
target_branch.startsWith("refs/tags/")
)
) || (
event == "pull_request" && (
source_branch.matches("(konflux|renovate|appstudio|rhtap)") ||
body.pull_request.labels.exists(l, l.name == "konflux-build")
)
)
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-db
Expand Down
14 changes: 11 additions & 3 deletions .tekton/scanner-db-slim-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
pipelinesascode.tekton.dev/on-cel-expression: (
event == "push" && (
source_branch == "master" ||
target_branch.startsWith("refs/tags/")
)
) || (
event == "pull_request" && (
source_branch.matches("(konflux|renovate|appstudio|rhtap)") ||
body.pull_request.labels.exists(l, l.name == "konflux-build")
)
)
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-db-slim
Expand Down
14 changes: 11 additions & 3 deletions .tekton/scanner-slim-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "500"
# TODO(ROX-21073): re-enable for all PR branches
pipelinesascode.tekton.dev/on-cel-expression: |
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
pipelinesascode.tekton.dev/on-cel-expression: (
event == "push" && (
source_branch == "master" ||
target_branch.startsWith("refs/tags/")
)
) || (
event == "pull_request" && (
source_branch.matches("(konflux|renovate|appstudio|rhtap)") ||
body.pull_request.labels.exists(l, l.name == "konflux-build")
)
)
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-slim
Expand Down

0 comments on commit ff7e0f3

Please sign in to comment.