Skip to content

Commit ee8c972

Browse files
committed
test-fbc: add integration tests pipeline
Added integration tests for the osc-test-catalog application of Konflux. The tests comprise of our downstream Prow jobs that are triggered once the new osc-test-catalog image is built. That pipeline can run on push and/or pull-request events, it depends on how it is configure on Konflux. Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
1 parent 470b91f commit ee8c972

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
apiVersion: tekton.dev/v1beta1
2+
kind: Pipeline
3+
metadata:
4+
name: osc-test-fbc-integration
5+
spec:
6+
description: >-
7+
Run Prow jobs for testing the osc-test-fbc catalog.
8+
params:
9+
- name: GANGWAY_TOKEN
10+
type: string
11+
description: Token to authenticate with gangway
12+
default: gangway-token
13+
- description: 'Snapshot of the application'
14+
name: SNAPSHOT
15+
default: '{"components": [{"name":"osc-test-fbc", "containerImage": "quay.io/redhat-user-workloads/ose-osc-tenant/osc-test-fbc:latest"}]}'
16+
type: string
17+
tasks:
18+
- name: get-catalog-image
19+
params:
20+
- name: SNAPSHOT
21+
value: $(params.SNAPSHOT)
22+
taskSpec:
23+
params:
24+
- name: SNAPSHOT
25+
results:
26+
- name: CATALOG_IMAGE
27+
description: "The catalog image extracted from the SNAPSHOT"
28+
steps:
29+
- name: get-catalog-image
30+
image: registry.redhat.io/openshift4/ose-cli:latest
31+
env:
32+
- name: SNAPSHOT
33+
value: $(params.SNAPSHOT)
34+
script: |
35+
#!/bin/bash
36+
set -e
37+
dnf -y install jq
38+
echo "Snapshot: ${SNAPSHOT}"
39+
catalogImage=$(jq -r '.components[] | select(.name=="osc-test-fbc") | .containerImage' <<< "${SNAPSHOT}")
40+
echo "Catalog image: ${catalogImage}"
41+
echo "${catalogImage}" > $(results.CATALOG_IMAGE.path)
42+
- name: prow-job
43+
displayName: "Running prow job $(params.PROWJOB_NAME)"
44+
runAfter:
45+
- get-catalog-image
46+
taskRef:
47+
resolver: git
48+
params:
49+
- name: url
50+
value: https://github.com/openshift/konflux-tasks
51+
- name: revision
52+
value: 26d8e981a7d1d035f05c4accd30b38d07f8f02b5
53+
- name: pathInRepo
54+
value: tasks/provide-prowjob/0.1/provide-prowjob.yaml
55+
params:
56+
- name: SNAPSHOT
57+
value: $(params.SNAPSHOT)
58+
- name: VARIANT
59+
value: downstream-candidate
60+
- name: ENVS
61+
value: "CATALOG_SOURCE_IMAGE=$(tasks.get-catalog-image.results.CATALOG_IMAGE)"
62+
matrix:
63+
params:
64+
- name: PROWJOB_NAME
65+
value:
66+
- periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate-azure-ipi-kata
67+
- periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate-azure-ipi-peerpods
68+
- periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate-azure-ipi-coco
69+
- periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate-aws-ipi-peerpods
70+
- periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate-aws-ipi-coco

0 commit comments

Comments
 (0)