Skip to content

Commit 218d2e9

Browse files
committed
Added separate tests for each component
Signed-off-by: Abhishek Ghosh <[email protected]>
1 parent 04b40fb commit 218d2e9

File tree

1 file changed

+173
-53
lines changed

1 file changed

+173
-53
lines changed

.konflux/tekton/bundle-e2e-pipeline.yaml

Lines changed: 173 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,78 @@ spec:
4040
params:
4141
- name: SNAPSHOT
4242
value: $(params.SNAPSHOT)
43+
44+
# Shared setup task that can be reused by all E2E tests
45+
- name: setup-test-environment
46+
runAfter:
47+
- deploy-operator
48+
taskSpec:
49+
results:
50+
- name: kubeconfig-path
51+
description: Path to the kubeconfig file
52+
volumes:
53+
- name: credentials
54+
emptyDir: { }
55+
- name: source
56+
emptyDir: { }
57+
stepTemplate:
58+
image: $(params.image)
59+
volumeMounts:
60+
- name: source
61+
mountPath: /source
62+
- name: credentials
63+
mountPath: /credentials
64+
steps:
65+
- name: create-repo
66+
script: |
67+
mkdir -p /source/repo
68+
chmod 777 /source/repo
69+
- name: fetch-repo
70+
ref:
71+
resolver: http
72+
params:
73+
- name: url
74+
value: https://raw.githubusercontent.com/openshift-pipelines/tektoncd-catalog/p/stepactions/stepaction-git-clone/0.4.1/stepaction-git-clone.yaml
75+
params:
76+
- name: OUTPUT_PATH
77+
value: /source/repo
78+
- name: URL
79+
value: $(params.repo_url)
80+
- name: REVISION
81+
value: $(params.revision)
82+
- name: get-kubeconfig
83+
ref:
84+
resolver: git
85+
params:
86+
- name: url
87+
value: https://github.com/konflux-ci/build-definitions.git
88+
- name: revision
89+
value: main
90+
- name: pathInRepo
91+
value: stepactions/eaas-get-ephemeral-cluster-credentials/0.1/eaas-get-ephemeral-cluster-credentials.yaml
92+
params:
93+
- name: eaasSpaceSecretRef
94+
value: $(tasks.provision-eaas-space.results.secretRef)
95+
- name: clusterName
96+
value: "$(tasks.provision-cluster.results.clusterName)"
97+
- name: credentials
98+
value: credentials
99+
- name: configure-tekton-config
100+
workingDir: /source/repo
101+
env:
102+
- name: KUBECONFIG
103+
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
104+
- name: KUBECONFIG_PATH
105+
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
106+
- name: GITHUB_TOKEN
107+
valueFrom:
108+
secretKeyRef:
109+
key: github-token
110+
name: github
111+
optional: true
112+
script: |
113+
gauge run --tags="" --log-level=debug --verbose specs/konflux-olm.spec
114+
echo "$KUBECONFIG_PATH" > $(results.kubeconfig-path.path)
43115
- name: provision-eaas-space
44116
runAfter:
45117
- parse-metadata
@@ -188,9 +260,9 @@ spec:
188260
source: "custom-osp-nightly"
189261
sourceNamespace: openshift-marketplace
190262
EOF
191-
- name: e2e-test
263+
- name: e2e-test-pipelines
192264
runAfter:
193-
- deploy-operator
265+
- setup-test-environment
194266
params:
195267
- name: SNAPSHOT
196268
value: $(params.SNAPSHOT)
@@ -210,74 +282,122 @@ spec:
210282
- name: credentials
211283
mountPath: /credentials
212284
steps:
213-
- name: create-repo
214-
image: $(params.image)
215-
script: |
216-
mkdir -p /source/repo
217-
chmod 777 /source/repo
218-
- name: fetch-repo
219-
ref:
220-
resolver: http
221-
params:
222-
- name: url
223-
value: https://raw.githubusercontent.com/openshift-pipelines/tektoncd-catalog/p/stepactions/stepaction-git-clone/0.4.1/stepaction-git-clone.yaml
224-
params:
225-
- name: OUTPUT_PATH
226-
value: /source/repo
227-
- name: URL
228-
value: $(params.repo_url)
229-
- name: REVISION
230-
value: $(params.revision)
231-
232-
- name: get-kubeconfig
233-
ref:
234-
resolver: git
235-
params:
236-
- name: url
237-
value: https://github.com/konflux-ci/build-definitions.git
238-
- name: revision
239-
value: main
240-
- name: pathInRepo
241-
value: stepactions/eaas-get-ephemeral-cluster-credentials/0.1/eaas-get-ephemeral-cluster-credentials.yaml
242-
params:
243-
- name: eaasSpaceSecretRef
244-
value: $(tasks.provision-eaas-space.results.secretRef)
245-
- name: clusterName
246-
value: "$(tasks.provision-cluster.results.clusterName)"
247-
- name: credentials
248-
value: credentials
249-
250-
- name: configure-tekton-config
251-
image: $(params.image)
285+
- name: run-e2e-tests
252286
workingDir: /source/repo
253287
env:
254288
- name: KUBECONFIG
255-
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
256-
- name: GITHUB_TOKEN
289+
value: "$(tasks.setup-test-environment.results.kubeconfig-path)"
290+
- name: CHAINS_DOCKER_CONFIG_JSON
257291
valueFrom:
258292
secretKeyRef:
259-
key: github-token
260-
name: github
261-
optional: true
293+
key: config.json
294+
name: quay-io-dockerconfig
262295
script: |
263-
gauge run --tags="" --log-level=debug --verbose specs/konflux-olm.spec
264-
296+
export CHAINS_REPOSITORY=quay.io/openshift-pipeline/chainstest
297+
gauge run --tags="" --log-level=debug --verbose specs/pipelines/
298+
- name: e2e-test-metrics
299+
runAfter:
300+
- setup-test-environment
301+
params:
302+
- name: SNAPSHOT
303+
value: $(params.SNAPSHOT)
304+
taskSpec:
305+
params:
306+
- name: SNAPSHOT
307+
volumes:
308+
- name: credentials
309+
emptyDir: { }
310+
- name: source
311+
emptyDir: { }
312+
stepTemplate:
313+
image: $(params.image)
314+
volumeMounts:
315+
- name: source
316+
mountPath: /source
317+
- name: credentials
318+
mountPath: /credentials
319+
steps:
265320
- name: run-e2e-tests
266-
image: $(params.image)
267321
workingDir: /source/repo
268322
env:
269323
- name: KUBECONFIG
270-
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
324+
value: "$(tasks.setup-test-environment.results.kubeconfig-path)"
271325
- name: CHAINS_DOCKER_CONFIG_JSON
272326
valueFrom:
273327
secretKeyRef:
274328
key: config.json
275329
name: quay-io-dockerconfig
276330
script: |
277-
278331
export CHAINS_REPOSITORY=quay.io/openshift-pipeline/chainstest
279-
280-
gauge run --tags="" --log-level=debug --verbose specs/pipelines/
281332
gauge run --tags="" --log-level=debug --verbose specs/metrics/
333+
- name: e2e-test-chains
334+
runAfter:
335+
- setup-test-environment
336+
params:
337+
- name: SNAPSHOT
338+
value: $(params.SNAPSHOT)
339+
taskSpec:
340+
params:
341+
- name: SNAPSHOT
342+
volumes:
343+
- name: credentials
344+
emptyDir: { }
345+
- name: source
346+
emptyDir: { }
347+
stepTemplate:
348+
image: $(params.image)
349+
volumeMounts:
350+
- name: source
351+
mountPath: /source
352+
- name: credentials
353+
mountPath: /credentials
354+
steps:
355+
- name: run-e2e-tests
356+
workingDir: /source/repo
357+
env:
358+
- name: KUBECONFIG
359+
value: "$(tasks.setup-test-environment.results.kubeconfig-path)"
360+
- name: CHAINS_DOCKER_CONFIG_JSON
361+
valueFrom:
362+
secretKeyRef:
363+
key: config.json
364+
name: quay-io-dockerconfig
365+
script: |
366+
export CHAINS_REPOSITORY=quay.io/openshift-pipeline/chainstest
282367
gauge run --tags="" --log-level=debug --verbose specs/chains/
368+
369+
- name: e2e-test-manualapprovalgate
370+
runAfter:
371+
- setup-test-environment
372+
params:
373+
- name: SNAPSHOT
374+
value: $(params.SNAPSHOT)
375+
taskSpec:
376+
params:
377+
- name: SNAPSHOT
378+
volumes:
379+
- name: credentials
380+
emptyDir: { }
381+
- name: source
382+
emptyDir: { }
383+
stepTemplate:
384+
image: $(params.image)
385+
volumeMounts:
386+
- name: source
387+
mountPath: /source
388+
- name: credentials
389+
mountPath: /credentials
390+
steps:
391+
- name: run-e2e-tests
392+
workingDir: /source/repo
393+
env:
394+
- name: KUBECONFIG
395+
value: "$(tasks.setup-test-environment.results.kubeconfig-path)"
396+
- name: CHAINS_DOCKER_CONFIG_JSON
397+
valueFrom:
398+
secretKeyRef:
399+
key: config.json
400+
name: quay-io-dockerconfig
401+
script: |
402+
export CHAINS_REPOSITORY=quay.io/openshift-pipeline/chainstest
283403
gauge run --tags="" --log-level=debug --verbose specs/manualapprovalgate/

0 commit comments

Comments
 (0)