Skip to content

Commit 3827e34

Browse files
jiridanekcoderabbitai[bot]
authored andcommitted
RHOAIENG-30439: tekton: add script to generate pull-request-specific PipelineRun definitions (#1508)
* set timeout like in red-hat-data-services/konflux-central#303 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent d4c6e5d commit 3827e34

File tree

35 files changed

+2088
-16
lines changed

35 files changed

+2088
-16
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# yamllint disable-file
2+
# This pipeline is autogenerated by scripts/generate_pull_request_pipelineruns.py
3+
---
4+
apiVersion: tekton.dev/v1
5+
kind: PipelineRun
6+
metadata:
7+
annotations:
8+
build.appstudio.openshift.io/repo: https://github.com/opendatahub-io/notebooks?rev={{revision}}
9+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
10+
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
11+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
12+
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
13+
pipelinesascode.tekton.dev/max-keep-runs: '3'
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/datascience/ubi9-python-3.11
15+
pipelinesascode.tekton.dev/on-cel-expression: |
16+
event == "pull_request" && target_branch
17+
== "main"
18+
&& !("manifests/base/params-latest.env".pathChanged())
19+
&& ( "runtimes/datascience/ubi9-python-3.11/**".pathChanged() ||
20+
".tekton/odh-pipeline-runtime-datascience-cpu-py311-ubi9-pull-request.yaml".pathChanged() )
21+
&& body.repository.full_name == "opendatahub-io/notebooks"
22+
labels:
23+
appstudio.openshift.io/application: opendatahub-release
24+
appstudio.openshift.io/component: odh-pipeline-runtime-datascience-cpu-py311-ubi9
25+
pipelines.appstudio.openshift.io/type: build
26+
name: odh-pipeline-runtime-datascience-cpu-py311-ubi9-on-pull-request
27+
namespace: open-data-hub-tenant
28+
spec:
29+
timeouts:
30+
pipeline: 3h
31+
params:
32+
- name: git-url
33+
value: '{{source_url}}'
34+
- name: revision
35+
value: '{{revision}}'
36+
- name: output-image
37+
value: quay.io/opendatahub/odh-pipeline-runtime-datascience-cpu-py311-ubi9:on-pr-{{revision}}
38+
- name: image-expires-after
39+
value: 5d
40+
- name: build-platforms
41+
value:
42+
- linux/x86_64
43+
- name: dockerfile
44+
value: runtimes/datascience/ubi9-python-3.11/Dockerfile.cpu
45+
- name: path-context
46+
value: .
47+
pipelineRef:
48+
name: multiarch-pull-request-pipeline
49+
taskRunTemplate:
50+
serviceAccountName: build-pipeline-odh-pipeline-runtime-datascience-cpu-py311-ubi9
51+
workspaces:
52+
- name: git-auth
53+
secret:
54+
secretName: '{{ git_auth_secret }}'
55+
status: {}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# yamllint disable-file
2+
# This pipeline is autogenerated by scripts/generate_pull_request_pipelineruns.py
3+
---
4+
apiVersion: tekton.dev/v1
5+
kind: PipelineRun
6+
metadata:
7+
annotations:
8+
build.appstudio.openshift.io/repo: https://github.com/opendatahub-io/notebooks?rev={{revision}}
9+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
10+
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
11+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
12+
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
13+
pipelinesascode.tekton.dev/max-keep-runs: '3'
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/datascience/ubi9-python-3.12
15+
pipelinesascode.tekton.dev/on-cel-expression: |
16+
event == "pull_request" && target_branch
17+
== "main"
18+
&& !("manifests/base/params-latest.env".pathChanged())
19+
&& ( "runtimes/datascience/ubi9-python-3.12/**".pathChanged() ||
20+
".tekton/odh-pipeline-runtime-datascience-cpu-py312-ubi9-pull-request.yaml".pathChanged() )
21+
&& body.repository.full_name == "opendatahub-io/notebooks"
22+
labels:
23+
appstudio.openshift.io/application: opendatahub-release
24+
appstudio.openshift.io/component: odh-pipeline-runtime-datascience-cpu-py312-ubi9
25+
pipelines.appstudio.openshift.io/type: build
26+
name: odh-pipeline-runtime-datascience-cpu-py312-ubi9-on-pull-request
27+
namespace: open-data-hub-tenant
28+
spec:
29+
timeouts:
30+
pipeline: 3h
31+
params:
32+
- name: git-url
33+
value: '{{source_url}}'
34+
- name: revision
35+
value: '{{revision}}'
36+
- name: output-image
37+
value: quay.io/opendatahub/odh-pipeline-runtime-datascience-cpu-py312-ubi9:on-pr-{{revision}}
38+
- name: image-expires-after
39+
value: 5d
40+
- name: build-platforms
41+
value:
42+
- linux/x86_64
43+
- name: dockerfile
44+
value: runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu
45+
- name: path-context
46+
value: .
47+
pipelineRef:
48+
name: multiarch-pull-request-pipeline
49+
taskRunTemplate:
50+
serviceAccountName: build-pipeline-odh-pipeline-runtime-datascience-cpu-py312-ubi9
51+
workspaces:
52+
- name: git-auth
53+
secret:
54+
secretName: '{{ git_auth_secret }}'
55+
status: {}

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# yamllint disable-file
2+
# This pipeline is autogenerated by scripts/generate_pull_request_pipelineruns.py
3+
---
14
apiVersion: tekton.dev/v1
25
kind: PipelineRun
36
metadata:
@@ -6,13 +9,14 @@ metadata:
69
build.appstudio.redhat.com/commit_sha: '{{revision}}'
710
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
811
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
9-
pipelinesascode.tekton.dev/cancel-in-progress: "true"
10-
pipelinesascode.tekton.dev/max-keep-runs: "3"
11-
pipelinesascode.tekton.dev/on-comment: "^/kfbuild runtimes/minimal/ubi9-python-3.11"
12-
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
12+
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
13+
pipelinesascode.tekton.dev/max-keep-runs: '3'
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/minimal/ubi9-python-3.11
15+
pipelinesascode.tekton.dev/on-cel-expression: |
16+
event == "pull_request" && target_branch
1317
== "main"
1418
&& !("manifests/base/params-latest.env".pathChanged())
15-
&& ( "runtimes/minimal/ubi9-python-3.11/**".pathChanged() ||
19+
&& ( "runtimes/minimal/ubi9-python-3.11/**".pathChanged() ||
1620
".tekton/odh-pipeline-runtime-minimal-cpu-py311-ubi9-pull-request.yaml".pathChanged() )
1721
&& body.repository.full_name == "opendatahub-io/notebooks"
1822
labels:
@@ -22,7 +26,8 @@ metadata:
2226
name: odh-pipeline-runtime-minimal-cpu-py311-ubi9-on-pull-request
2327
namespace: open-data-hub-tenant
2428
spec:
25-
timeout: "4h0m0s"
29+
timeouts:
30+
pipeline: 3h
2631
params:
2732
- name: git-url
2833
value: '{{source_url}}'
@@ -31,12 +36,12 @@ spec:
3136
- name: output-image
3237
value: quay.io/opendatahub/odh-pipeline-runtime-minimal-cpu-py311-ubi9:on-pr-{{revision}}
3338
- name: image-expires-after
34-
value: "5d"
39+
value: 5d
3540
- name: build-platforms
3641
value:
37-
- linux/x86_64
38-
- linux/arm64
39-
- linux/s390x
42+
- linux/x86_64
43+
- linux/arm64
44+
- linux/s390x
4045
- name: dockerfile
4146
value: runtimes/minimal/ubi9-python-3.11/Dockerfile.cpu
4247
- name: path-context

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# yamllint disable-file
2+
# This pipeline is autogenerated by scripts/generate_pull_request_pipelineruns.py
3+
---
14
apiVersion: tekton.dev/v1
25
kind: PipelineRun
36
metadata:
@@ -6,10 +9,11 @@ metadata:
69
build.appstudio.redhat.com/commit_sha: '{{revision}}'
710
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
811
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
9-
pipelinesascode.tekton.dev/cancel-in-progress: "true"
10-
pipelinesascode.tekton.dev/max-keep-runs: "3"
11-
pipelinesascode.tekton.dev/on-comment: "^/kfbuild runtimes/minimal/ubi9-python-3.12"
12-
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch
12+
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
13+
pipelinesascode.tekton.dev/max-keep-runs: '3'
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/minimal/ubi9-python-3.12
15+
pipelinesascode.tekton.dev/on-cel-expression: |
16+
event == "pull_request" && target_branch
1317
== "main"
1418
&& !("manifests/base/params-latest.env".pathChanged())
1519
&& ( "runtimes/minimal/ubi9-python-3.12/**".pathChanged() ||
@@ -22,7 +26,8 @@ metadata:
2226
name: odh-pipeline-runtime-minimal-cpu-py312-ubi9-on-pull-request
2327
namespace: open-data-hub-tenant
2428
spec:
25-
timeout: "4h0m0s"
29+
timeouts:
30+
pipeline: 3h
2631
params:
2732
- name: git-url
2833
value: '{{source_url}}'
@@ -31,7 +36,7 @@ spec:
3136
- name: output-image
3237
value: quay.io/opendatahub/odh-pipeline-runtime-minimal-cpu-py312-ubi9:on-pr-{{revision}}
3338
- name: image-expires-after
34-
value: "5d"
39+
value: 5d
3540
- name: build-platforms
3641
value:
3742
- linux/x86_64
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# yamllint disable-file
2+
# This pipeline is autogenerated by scripts/generate_pull_request_pipelineruns.py
3+
---
4+
apiVersion: tekton.dev/v1
5+
kind: PipelineRun
6+
metadata:
7+
annotations:
8+
build.appstudio.openshift.io/repo: https://github.com/opendatahub-io/notebooks?rev={{revision}}
9+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
10+
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
11+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
12+
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
13+
pipelinesascode.tekton.dev/max-keep-runs: '3'
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/pytorch/ubi9-python-3.11
15+
pipelinesascode.tekton.dev/on-cel-expression: |
16+
event == "pull_request" && target_branch
17+
== "main"
18+
&& !("manifests/base/params-latest.env".pathChanged())
19+
&& ( ".tekton/odh-pipeline-runtime-pytorch-cuda-py311-ubi9-pull-request.yaml".pathChanged() ||
20+
"runtimes/pytorch/ubi9-python-3.11/**".pathChanged() ||
21+
"cuda/**".pathChanged() )
22+
&& body.repository.full_name == "opendatahub-io/notebooks"
23+
labels:
24+
appstudio.openshift.io/application: opendatahub-release
25+
appstudio.openshift.io/component: odh-pipeline-runtime-pytorch-cuda-py311-ubi9
26+
pipelines.appstudio.openshift.io/type: build
27+
name: odh-pipeline-runtime-pytorch-cuda-py311-ubi9-on-pull-request
28+
namespace: open-data-hub-tenant
29+
spec:
30+
timeouts:
31+
pipeline: 3h
32+
params:
33+
- name: git-url
34+
value: '{{source_url}}'
35+
- name: revision
36+
value: '{{revision}}'
37+
- name: output-image
38+
value: quay.io/opendatahub/odh-pipeline-runtime-pytorch-cuda-py311-ubi9:on-pr-{{revision}}
39+
- name: image-expires-after
40+
value: 5d
41+
- name: build-platforms
42+
value:
43+
- linux/x86_64
44+
- name: dockerfile
45+
value: runtimes/pytorch/ubi9-python-3.11/Dockerfile.cuda
46+
- name: path-context
47+
value: .
48+
pipelineRef:
49+
name: multiarch-pull-request-pipeline
50+
taskRunTemplate:
51+
serviceAccountName: build-pipeline-odh-pipeline-runtime-pytorch-cuda-py311-ubi9
52+
workspaces:
53+
- name: git-auth
54+
secret:
55+
secretName: '{{ git_auth_secret }}'
56+
status: {}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# yamllint disable-file
2+
# This pipeline is autogenerated by scripts/generate_pull_request_pipelineruns.py
3+
---
4+
apiVersion: tekton.dev/v1
5+
kind: PipelineRun
6+
metadata:
7+
annotations:
8+
build.appstudio.openshift.io/repo: https://github.com/opendatahub-io/notebooks?rev={{revision}}
9+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
10+
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
11+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
12+
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
13+
pipelinesascode.tekton.dev/max-keep-runs: '3'
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/pytorch/ubi9-python-3.12
15+
pipelinesascode.tekton.dev/on-cel-expression: |
16+
event == "pull_request" && target_branch
17+
== "main"
18+
&& !("manifests/base/params-latest.env".pathChanged())
19+
&& ( ".tekton/odh-pipeline-runtime-pytorch-cuda-py312-ubi9-pull-request.yaml".pathChanged() ||
20+
"runtimes/pytorch/ubi9-python-3.12/**".pathChanged() ||
21+
"cuda/**".pathChanged() )
22+
&& body.repository.full_name == "opendatahub-io/notebooks"
23+
labels:
24+
appstudio.openshift.io/application: opendatahub-release
25+
appstudio.openshift.io/component: odh-pipeline-runtime-pytorch-cuda-py312-ubi9
26+
pipelines.appstudio.openshift.io/type: build
27+
name: odh-pipeline-runtime-pytorch-cuda-py312-ubi9-on-pull-request
28+
namespace: open-data-hub-tenant
29+
spec:
30+
timeouts:
31+
pipeline: 3h
32+
params:
33+
- name: git-url
34+
value: '{{source_url}}'
35+
- name: revision
36+
value: '{{revision}}'
37+
- name: output-image
38+
value: quay.io/opendatahub/odh-pipeline-runtime-pytorch-cuda-py312-ubi9:on-pr-{{revision}}
39+
- name: image-expires-after
40+
value: 5d
41+
- name: build-platforms
42+
value:
43+
- linux/x86_64
44+
- name: dockerfile
45+
value: runtimes/pytorch/ubi9-python-3.12/Dockerfile.cuda
46+
- name: path-context
47+
value: .
48+
pipelineRef:
49+
name: multiarch-pull-request-pipeline
50+
taskRunTemplate:
51+
serviceAccountName: build-pipeline-odh-pipeline-runtime-pytorch-cuda-py312-ubi9
52+
workspaces:
53+
- name: git-auth
54+
secret:
55+
secretName: '{{ git_auth_secret }}'
56+
status: {}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# yamllint disable-file
2+
# This pipeline is autogenerated by scripts/generate_pull_request_pipelineruns.py
3+
---
4+
apiVersion: tekton.dev/v1
5+
kind: PipelineRun
6+
metadata:
7+
annotations:
8+
build.appstudio.openshift.io/repo: https://github.com/opendatahub-io/notebooks?rev={{revision}}
9+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
10+
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
11+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
12+
pipelinesascode.tekton.dev/cancel-in-progress: 'true'
13+
pipelinesascode.tekton.dev/max-keep-runs: '3'
14+
pipelinesascode.tekton.dev/on-comment: ^/kfbuild runtimes/rocm-pytorch/ubi9-python-3.11
15+
pipelinesascode.tekton.dev/on-cel-expression: |
16+
event == "pull_request" && target_branch
17+
== "main"
18+
&& !("manifests/base/params-latest.env".pathChanged())
19+
&& (".tekton/odh-pipeline-runtime-pytorch-rocm-py311-ubi9-pull-request.yaml".pathChanged() ||
20+
"runtimes/rocm-pytorch/ubi9-python-3.11/**".pathChanged() )
21+
&& body.repository.full_name == "opendatahub-io/notebooks"
22+
labels:
23+
appstudio.openshift.io/application: opendatahub-release
24+
appstudio.openshift.io/component: odh-pipeline-runtime-pytorch-rocm-py311-ubi9
25+
pipelines.appstudio.openshift.io/type: build
26+
name: odh-pipeline-runtime-pytorch-rocm-py311-ubi9-on-pull-request
27+
namespace: open-data-hub-tenant
28+
spec:
29+
timeouts:
30+
pipeline: 3h
31+
params:
32+
- name: git-url
33+
value: '{{source_url}}'
34+
- name: revision
35+
value: '{{revision}}'
36+
- name: output-image
37+
value: quay.io/opendatahub/odh-pipeline-runtime-pytorch-rocm-py311-ubi9:on-pr-{{revision}}
38+
- name: image-expires-after
39+
value: 5d
40+
- name: build-platforms
41+
value:
42+
- linux/x86_64
43+
- name: dockerfile
44+
value: runtimes/rocm-pytorch/ubi9-python-3.11/Dockerfile.rocm
45+
- name: path-context
46+
value: .
47+
pipelineRef:
48+
name: multiarch-pull-request-pipeline
49+
taskRunTemplate:
50+
serviceAccountName: build-pipeline-odh-pipeline-runtime-pytorch-rocm-py311-ubi9
51+
workspaces:
52+
- name: git-auth
53+
secret:
54+
secretName: '{{ git_auth_secret }}'
55+
status: {}

0 commit comments

Comments
 (0)