Skip to content

Commit 9d8e7da

Browse files
authored
ROX-26784: Configure tekton pipelines for release branch (#1703)
Which Konflux events will trigger builds: * Pushes: Target branch is release-* or any tag * PRs: all
1 parent d8301ea commit 9d8e7da

File tree

4 files changed

+32
-20
lines changed

4 files changed

+32
-20
lines changed

.tekton/scanner-build.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ metadata:
88
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
99
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1010
pipelinesascode.tekton.dev/max-keep-runs: "500"
11-
# TODO(ROX-21073): re-enable for all PR branches
1211
pipelinesascode.tekton.dev/on-cel-expression: |
13-
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
14-
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
12+
event == "pull_request" || (
13+
event == "push" && (
14+
source_branch.startsWith("release-") ||
15+
target_branch.startsWith("refs/tags/")
16+
)
17+
)
1518
labels:
16-
appstudio.openshift.io/application: acs
17-
appstudio.openshift.io/component: scanner
19+
appstudio.openshift.io/application: acs-4-6
20+
appstudio.openshift.io/component: scanner-4-6
1821
pipelines.appstudio.openshift.io/type: build
1922
name: scanner-build
2023
namespace: rh-acs-tenant

.tekton/scanner-db-build.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ metadata:
88
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
99
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1010
pipelinesascode.tekton.dev/max-keep-runs: "500"
11-
# TODO(ROX-21073): re-enable for all PR branches
1211
pipelinesascode.tekton.dev/on-cel-expression: |
13-
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
14-
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
12+
event == "pull_request" || (
13+
event == "push" && (
14+
source_branch.startsWith("release-") ||
15+
target_branch.startsWith("refs/tags/")
16+
)
17+
)
1518
labels:
16-
appstudio.openshift.io/application: acs
17-
appstudio.openshift.io/component: scanner-db
19+
appstudio.openshift.io/application: acs-4-6
20+
appstudio.openshift.io/component: scanner-db-4-6
1821
pipelines.appstudio.openshift.io/type: build
1922
name: scanner-db-build
2023
namespace: rh-acs-tenant

.tekton/scanner-db-slim-build.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ metadata:
88
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
99
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1010
pipelinesascode.tekton.dev/max-keep-runs: "500"
11-
# TODO(ROX-21073): re-enable for all PR branches
1211
pipelinesascode.tekton.dev/on-cel-expression: |
13-
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
14-
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
12+
event == "pull_request" || (
13+
event == "push" && (
14+
source_branch.startsWith("release-") ||
15+
target_branch.startsWith("refs/tags/")
16+
)
17+
)
1518
labels:
16-
appstudio.openshift.io/application: acs
17-
appstudio.openshift.io/component: scanner-db-slim
19+
appstudio.openshift.io/application: acs-4-6
20+
appstudio.openshift.io/component: scanner-db-slim-4-6
1821
pipelines.appstudio.openshift.io/type: build
1922
name: scanner-db-slim-build
2023
namespace: rh-acs-tenant

.tekton/scanner-slim-build.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ metadata:
88
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
99
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1010
pipelinesascode.tekton.dev/max-keep-runs: "500"
11-
# TODO(ROX-21073): re-enable for all PR branches
1211
pipelinesascode.tekton.dev/on-cel-expression: |
13-
(event == "push" && target_branch.matches("^(master|release-.*)$")) ||
14-
(event == "pull_request" && (source_branch.matches("(konflux|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
12+
event == "pull_request" || (
13+
event == "push" && (
14+
target_branch.startsWith("release-") ||
15+
target_branch.startsWith("refs/tags/")
16+
)
17+
)
1518
labels:
16-
appstudio.openshift.io/application: acs
17-
appstudio.openshift.io/component: scanner-slim
19+
appstudio.openshift.io/application: acs-4-6
20+
appstudio.openshift.io/component: scanner-slim-4-6
1821
pipelines.appstudio.openshift.io/type: build
1922
name: scanner-slim-build
2023
namespace: rh-acs-tenant

0 commit comments

Comments
 (0)