Skip to content

Commit 398c522

Browse files
committed
[wip] add new pipeline to trigger prow jobs
1 parent aa7cd44 commit 398c522

File tree

1 file changed

+175
-0
lines changed

1 file changed

+175
-0
lines changed

.tekton/run-prowjob-pipeline.yaml

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
apiVersion: tekton.dev/v1beta1
2+
kind: Pipeline
3+
metadata:
4+
name: run-prowjob-pipeline
5+
spec:
6+
description: >-
7+
Run a parameterized prowjob using gangway.
8+
params:
9+
# Konflux Snapshot
10+
- name: SNAPSHOT
11+
type: string
12+
description: |
13+
JSON snapshot of the application containing component information.
14+
Example: {
15+
"components": [
16+
{
17+
"name": "my-operator",
18+
"containerImage": "quay.io/myorg/my-operator:v1.2.3-abc"
19+
},
20+
{
21+
"name": "my-operator-bundle",
22+
"containerImage": "quay.io/myorg/my-operator-bundle:v1.2.3-abc"
23+
}
24+
]
25+
}
26+
27+
# OpenShift CI Test Environment Claim
28+
- name: GANGWAY_TOKEN
29+
type: string
30+
description: |
31+
Name of the secret containing the token to authenticate with gangway.
32+
The secret should exist in the same namespace and contain a 'token' key.
33+
- name: CLOUD_PROVIDER
34+
type: string
35+
default: aws
36+
description: |
37+
Cloud provider to use for the test.
38+
Valid values: aws, gcp, azure
39+
- name: OPENSHIFT_VERSION
40+
type: string
41+
default: "4.18"
42+
description: |
43+
OpenShift version to test against in format 4.x or 4.x.y.
44+
Examples: "4.18", "4.17.5"
45+
- name: CHANNEL_STREAM
46+
type: string
47+
default: stable
48+
description: |
49+
OpenShift stream/channel to test against.
50+
Valid values: stable, fast, candidate, 4-stable, nightly, konflux-nightly, ci
51+
- name: ARCHITECTURE
52+
type: string
53+
default: arm64
54+
description: |
55+
Target architecture for testing.
56+
Valid values: amd64, arm64
57+
- name: ENVS
58+
type: string
59+
default: ""
60+
description: |
61+
Optional environment variables for the test, comma-separated.
62+
Example: "COMPUTE_NODE_TYPE=t2a-standard-4,COMPUTE_NODE_REPLICAS=2"
63+
64+
# Run Tests
65+
- name: PULL_SECRET
66+
type: string
67+
default: ""
68+
description: |
69+
Name of pull secret for private images (created in vault.ci.openshift.org).
70+
Should be in test-credential namespace with .dockerconfigjson field.
71+
- name: ARTIFACTS_BUILD_ROOT
72+
type: string
73+
default: "quay-proxy.ci.openshift.org/openshift/ci:ocp_builder_rhel-9-golang-1.22-openshift-4.18"
74+
description: |
75+
Base image for building the artifacts image.
76+
Exmaple: "brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.22"
77+
- name: DOCKERFILE_ADDITIONS
78+
type: string
79+
default: ""
80+
description: |
81+
Additional Dockerfile commands for building the artifacts image.
82+
Example: "RUN make build && make install"
83+
- name: DEPLOY_TEST_COMMAND
84+
type: string
85+
description: |
86+
Command that deploys and tests the application on the cluster.
87+
Example: "make deploy && make test-e2e"
88+
89+
# Pipeline Results
90+
results:
91+
- name: PROWJOB_ID
92+
description: ID of the triggered prowjob
93+
value: $(tasks.run-prowjob.results.PROWJOB_ID)
94+
- name: PROWJOB_URL
95+
description: Spyglass URL for prowjob results
96+
value: $(tasks.run-prowjob.results.PROWJOB_URL)
97+
- name: PROWJOB_STATUS
98+
description: Final prowjob status
99+
value: $(tasks.run-prowjob.results.PROWJOB_STATUS)
100+
101+
tasks:
102+
- name: run-prowjob
103+
displayName: "Running prowjob $(params.PROWJOB_NAME)"
104+
taskRef:
105+
resolver: git
106+
params:
107+
- name: url
108+
value: https://github.com/openshift/konflux-tasks
109+
- name: revision
110+
value: main
111+
- name: pathInRepo
112+
value: tasks/run-prowjob.yaml
113+
params:
114+
- name: SNAPSHOT
115+
value: $(params.SNAPSHOT)
116+
- name: GANGWAY_TOKEN
117+
value: $(params.GANGWAY_TOKEN)
118+
- name: CLOUD_PROVIDER
119+
value: $(params.CLOUD_PROVIDER)
120+
- name: OPENSHIFT_VERSION
121+
value: $(params.OPENSHIFT_VERSION)
122+
- name: CHANNEL_STREAM
123+
value: $(params.CHANNEL_STREAM)
124+
- name: ARCHITECTURE
125+
value: $(params.ARCHITECTURE)
126+
- name: ENVS
127+
value: $(params.ENVS)
128+
- name: ARTIFACTS_BUILD_ROOT
129+
value: $(params.ARTIFACTS_BUILD_ROOT)
130+
- name: DOCKERFILE_ADDITIONS
131+
value: $(params.DOCKERFILE_ADDITIONS)
132+
- name: DEPLOY_TEST_COMMAND
133+
value: $(params.DEPLOY_TEST_COMMAND)
134+
- name: PULL_SECRET
135+
value: $(params.PULL_SECRET)
136+
# ---
137+
## To be created in the tenants-config repo: https://gitlab.cee.redhat.com/releng/konflux-release-data/-/tree/main/tenants-config
138+
# apiVersion: appstudio.redhat.com/v1beta2
139+
# kind: IntegrationTestScenario
140+
# metadata:
141+
# labels:
142+
# test.appstudio.openshift.io/optional: "true"
143+
# name: run-prowjob
144+
# namespace: cert-manager-oape-tenant
145+
# spec:
146+
# application: cert-manager-operator-fbc
147+
# contexts:
148+
# - description: Sanity testing for cert-manager-operator-fbc
149+
# name: component_cert-manager-operator-fbc
150+
# params:
151+
# - name: SNAPSHOT
152+
# value: |
153+
# {
154+
# "components": [
155+
# {
156+
# "name": "cert-manager-operator-fbc",
157+
# "containerImage": "quay.io/redhat-user-workloads/cert-manager-oape-tenant/cert-manager-operator/cert-manager-operator-fbc:latest"
158+
# }
159+
# ]
160+
# }
161+
# - name: DEPLOY_TEST_COMMAND
162+
# value: 'E2E_GINKGO_LABEL_FILTER="Platform: isSubsetOf {AWS} && !TechPreview" make test-e2e'
163+
# - name: PULL_SECRET
164+
# value: "openshift-custom-mirror-registry"
165+
# - name: GANGWAY_TOKEN
166+
# value: "tmp-gangway-api-token"
167+
# resolverRef:
168+
# params:
169+
# - name: url
170+
# value: https://github.com/lunarwhite/ocp-cert-manager-operator-release.git
171+
# - name: revision
172+
# value: tmp
173+
# - name: pathInRepo
174+
# value: .tekton/run-prowjob-pipeline.yaml
175+
# resolver: git

0 commit comments

Comments
 (0)