Skip to content

Commit

Permalink
ROX-26784: Configure tekton pipelines for release branch (#1703)
Browse files Browse the repository at this point in the history
Which Konflux events will trigger builds:

* Pushes: Target branch is release-* or any tag
* PRs: all
  • Loading branch information
kylape authored Nov 15, 2024
1 parent d8301ea commit 9d8e7da
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 20 deletions.
13 changes: 8 additions & 5 deletions .tekton/scanner-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ metadata:
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
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|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
event == "pull_request" || (
event == "push" && (
source_branch.startsWith("release-") ||
target_branch.startsWith("refs/tags/")
)
)
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner
appstudio.openshift.io/application: acs-4-6
appstudio.openshift.io/component: scanner-4-6
pipelines.appstudio.openshift.io/type: build
name: scanner-build
namespace: rh-acs-tenant
Expand Down
13 changes: 8 additions & 5 deletions .tekton/scanner-db-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ metadata:
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
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|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
event == "pull_request" || (
event == "push" && (
source_branch.startsWith("release-") ||
target_branch.startsWith("refs/tags/")
)
)
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-db
appstudio.openshift.io/application: acs-4-6
appstudio.openshift.io/component: scanner-db-4-6
pipelines.appstudio.openshift.io/type: build
name: scanner-db-build
namespace: rh-acs-tenant
Expand Down
13 changes: 8 additions & 5 deletions .tekton/scanner-db-slim-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ metadata:
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
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|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
event == "pull_request" || (
event == "push" && (
source_branch.startsWith("release-") ||
target_branch.startsWith("refs/tags/")
)
)
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-db-slim
appstudio.openshift.io/application: acs-4-6
appstudio.openshift.io/component: scanner-db-slim-4-6
pipelines.appstudio.openshift.io/type: build
name: scanner-db-slim-build
namespace: rh-acs-tenant
Expand Down
13 changes: 8 additions & 5 deletions .tekton/scanner-slim-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ metadata:
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
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|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
event == "pull_request" || (
event == "push" && (
target_branch.startsWith("release-") ||
target_branch.startsWith("refs/tags/")
)
)
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-slim
appstudio.openshift.io/application: acs-4-6
appstudio.openshift.io/component: scanner-slim-4-6
pipelines.appstudio.openshift.io/type: build
name: scanner-slim-build
namespace: rh-acs-tenant
Expand Down

0 comments on commit 9d8e7da

Please sign in to comment.