Skip to content

Commit 4e19512

Browse files
committed
Run rhtap-task-runner PipelineRuns only when needed
rhtap-task-runner PipelineRuns currently run on every PR and every push Only changes that should affect rhtap-task-runner should be: - change to PipelineRun definition itself - change to the Dockerfile - change to the rhtap directory which is copied in Dockerfile - change to the tools directory which is copied in Dockerfile Signed-off-by: Tomáš Nevrlka <[email protected]> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent f172954 commit 4e19512

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.tekton/rhtap-task-runner-pull-request.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ metadata:
88
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
99
pipelinesascode.tekton.dev/max-keep-runs: "3"
1010
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
11-
== "main"
11+
== "main" &&
12+
(
13+
".tekton/rhtap-task-runner-pull-request.yaml".pathChanged() ||
14+
"Dockerfile".pathChanged() ||
15+
"rhtap/***".pathChanged() ||
16+
"tools/***".pathChanged()
17+
)
1218
creationTimestamp: null
1319
labels:
1420
appstudio.openshift.io/application: rhtap-task-runner

.tekton/rhtap-task-runner-push.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ metadata:
77
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
88
pipelinesascode.tekton.dev/max-keep-runs: "3"
99
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch
10-
== "main"
10+
== "main" &&
11+
(
12+
".tekton/rhtap-task-runner-push.yaml".pathChanged() ||
13+
"Dockerfile".pathChanged() ||
14+
"rhtap/***".pathChanged() ||
15+
"tools/***".pathChanged()
16+
)
1117
creationTimestamp: null
1218
labels:
1319
appstudio.openshift.io/application: rhtap-task-runner

0 commit comments

Comments
 (0)