Skip to content

Commit 5fc38a0

Browse files
committed
feat: add testregistry for devprod
1 parent 5c19769 commit 5fc38a0

3 files changed

Lines changed: 92 additions & 0 deletions

File tree

.tekton/konflux-devlake-mcp-dfa32-pull-request.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: tekton.dev/v1
23
kind: PipelineRun
34
metadata:
@@ -572,6 +573,26 @@ spec:
572573
operator: in
573574
values:
574575
- "false"
576+
finally:
577+
- name: store-pipeline-status
578+
taskRef:
579+
resolver: git
580+
params:
581+
- name: url
582+
value: https://github.com/konflux-ci/tekton-integration-catalog.git
583+
- name: revision
584+
value: main
585+
- name: pathInRepo
586+
value: tasks/store-pipeline-status/0.1/store-pipeline-status.yaml
587+
params:
588+
- name: oci-ref
589+
value: quay.io/konflux-test-storage/konflux-devprod/devlake-mcp:devlake-pipeline-status-$(context.pipelineRun.name)
590+
- name: credentials-secret-name
591+
value: konflux-test-infra
592+
- name: pipeline-aggregate-status
593+
value: $(tasks.status)
594+
- name: pipelinerun-name
595+
value: $(context.pipelineRun.name)
575596
workspaces:
576597
- name: git-auth
577598
optional: true

.tekton/konflux-devlake-mcp-dfa32-push.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: tekton.dev/v1
23
kind: PipelineRun
34
metadata:
@@ -561,6 +562,26 @@ spec:
561562
operator: in
562563
values:
563564
- "false"
565+
finally:
566+
- name: store-pipeline-status
567+
taskRef:
568+
resolver: git
569+
params:
570+
- name: url
571+
value: https://github.com/konflux-ci/tekton-integration-catalog.git
572+
- name: revision
573+
value: main
574+
- name: pathInRepo
575+
value: tasks/store-pipeline-status/0.1/store-pipeline-status.yaml
576+
params:
577+
- name: oci-ref
578+
value: quay.io/konflux-test-storage/konflux-devprod/devlake-mcp:devlake-pipeline-status-$(context.pipelineRun.name)
579+
- name: credentials-secret-name
580+
value: konflux-test-infra
581+
- name: pipeline-aggregate-status
582+
value: $(tasks.status)
583+
- name: pipelinerun-name
584+
value: $(context.pipelineRun.name)
564585
workspaces:
565586
- name: git-auth
566587
optional: true

integration-tests/pipelines/e2e-tests-pipeline.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ spec:
5959
- name: MYSQL_ROOT_PASSWORD
6060
type: string
6161
default: "test_password"
62+
- name: pipelinerun-name
63+
type: string
64+
description: Name of the PipelineRun for OCI artifact tagging
6265
sidecars:
6366
- name: mysql
6467
image: mysql:8.0
@@ -85,6 +88,10 @@ spec:
8588
periodSeconds: 5
8689
timeoutSeconds: 5
8790
failureThreshold: 20
91+
volumes:
92+
- name: oci-credentials
93+
secret:
94+
secretName: konflux-test-infra
8895
steps:
8996
- name: clone-repository
9097
image: registry.access.redhat.com/ubi9/ubi-minimal:latest
@@ -175,9 +182,12 @@ spec:
175182
python -m pip install --upgrade pip
176183
pip install -r requirements.txt
177184
185+
mkdir -p /workspace/test-output
186+
178187
echo "Running E2E tests with coverage..."
179188
set +e
180189
pytest tests/e2e -vv --maxfail=1 --tb=short \
190+
--junitxml=/workspace/test-output/devlake-e2e-results.xml \
181191
--cov=. \
182192
--cov-report=xml:/workspace/source/coverage-e2e.xml \
183193
--cov-report=term \
@@ -188,6 +198,24 @@ spec:
188198
echo "$TEST_EXIT_CODE" > /workspace/source/test-exit-code
189199
echo "E2E tests finished with exit code $TEST_EXIT_CODE"
190200
201+
- name: push-junit-results
202+
ref:
203+
resolver: git
204+
params:
205+
- name: url
206+
value: https://github.com/konflux-ci/tekton-integration-catalog.git
207+
- name: revision
208+
value: main
209+
- name: pathInRepo
210+
value: stepactions/secure-push-oci/0.1/secure-push-oci.yaml
211+
params:
212+
- name: workdir-path
213+
value: /workspace/test-output
214+
- name: oci-ref
215+
value: quay.io/konflux-test-storage/konflux-devprod/devlake-mcp:devlake-e2e-results-$(params.pipelinerun-name)
216+
- name: credentials-volume-name
217+
value: oci-credentials
218+
191219
- name: upload-coverage
192220
image: registry.access.redhat.com/ubi9/python-311:latest
193221
workingDir: /workspace/source
@@ -229,3 +257,25 @@ spec:
229257
value: $(tasks.test-metadata.results.git-url)
230258
- name: git-revision
231259
value: $(tasks.test-metadata.results.git-revision)
260+
- name: pipelinerun-name
261+
value: $(context.pipelineRun.name)
262+
finally:
263+
- name: store-pipeline-status
264+
taskRef:
265+
resolver: git
266+
params:
267+
- name: url
268+
value: https://github.com/konflux-ci/tekton-integration-catalog.git
269+
- name: revision
270+
value: main
271+
- name: pathInRepo
272+
value: tasks/store-pipeline-status/0.1/store-pipeline-status.yaml
273+
params:
274+
- name: oci-ref
275+
value: quay.io/konflux-test-storage/konflux-devprod/devlake-mcp:devlake-e2e-status-$(context.pipelineRun.name)
276+
- name: credentials-secret-name
277+
value: konflux-test-infra
278+
- name: pipeline-aggregate-status
279+
value: $(tasks.status)
280+
- name: pipelinerun-name
281+
value: $(context.pipelineRun.name)

0 commit comments

Comments
 (0)