Skip to content

Commit 9fef62b

Browse files
authored
Issue #1512: RHOAIENG-30439: tekton: update on-comment regex to support multiple components in PipelineRun definitions (#1514)
* update regex to support whitespace and ensure `main()` exits properly * escape `component` and `dockerfile.parent` in `on-comment` regexp for safety
1 parent e632353 commit 9fef62b

File tree

35 files changed

+118
-124
lines changed

35 files changed

+118
-124
lines changed

.tekton/odh-pipeline-runtime-datascience-cpu-py311-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/datascience/ubi9-python-3.11
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-datascience\-cpu\-py311\-ubi9|runtimes/datascience/ubi9\-python\-3\.11)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

.tekton/odh-pipeline-runtime-datascience-cpu-py312-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/datascience/ubi9-python-3.12
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-datascience\-cpu\-py312\-ubi9|runtimes/datascience/ubi9\-python\-3\.12)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

.tekton/odh-pipeline-runtime-minimal-cpu-py311-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/minimal/ubi9-python-3.11
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-minimal\-cpu\-py311\-ubi9|runtimes/minimal/ubi9\-python\-3\.11)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

.tekton/odh-pipeline-runtime-minimal-cpu-py312-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/minimal/ubi9-python-3.12
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-minimal\-cpu\-py312\-ubi9|runtimes/minimal/ubi9\-python\-3\.12)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

.tekton/odh-pipeline-runtime-pytorch-cuda-py311-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/pytorch/ubi9-python-3.11
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-pytorch\-cuda\-py311\-ubi9|runtimes/pytorch/ubi9\-python\-3\.11)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

.tekton/odh-pipeline-runtime-pytorch-cuda-py312-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/pytorch/ubi9-python-3.12
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-pytorch\-cuda\-py312\-ubi9|runtimes/pytorch/ubi9\-python\-3\.12)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

.tekton/odh-pipeline-runtime-pytorch-rocm-py311-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/rocm-pytorch/ubi9-python-3.11
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-pytorch\-rocm\-py311\-ubi9|runtimes/rocm\-pytorch/ubi9\-python\-3\.11)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

.tekton/odh-pipeline-runtime-pytorch-rocm-py312-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/rocm-pytorch/ubi9-python-3.12
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-pytorch\-rocm\-py312\-ubi9|runtimes/rocm\-pytorch/ubi9\-python\-3\.12)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

.tekton/odh-pipeline-runtime-tensorflow-cuda-py311-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/tensorflow/ubi9-python-3.11
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-tensorflow\-cuda\-py311\-ubi9|runtimes/tensorflow/ubi9\-python\-3\.11)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

.tekton/odh-pipeline-runtime-tensorflow-cuda-py312-ubi9-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
1212
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
1313
pipelinesascode.tekton.dev/max-keep-runs: '3'
14-
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/tensorflow/ubi9-python-3.12
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild\s+(all|odh\-pipeline\-runtime\-tensorflow\-cuda\-py312\-ubi9|runtimes/tensorflow/ubi9\-python\-3\.12)
1515
pipelinesascode.tekton.dev/on-cel-expression: |
1616
event == "pull_request" && target_branch
1717
== "main"

0 commit comments

Comments
 (0)