From ba25cc71baf1cb7664360a907643b2560b01119d Mon Sep 17 00:00:00 2001 From: Martin Marosi Date: Fri, 13 Dec 2024 11:29:27 +0100 Subject: [PATCH] chore: add bonfire template task --- .tekton/integration-tests/cypress-e2e.yaml | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.tekton/integration-tests/cypress-e2e.yaml b/.tekton/integration-tests/cypress-e2e.yaml index 459ac6504..a8722212c 100644 --- a/.tekton/integration-tests/cypress-e2e.yaml +++ b/.tekton/integration-tests/cypress-e2e.yaml @@ -36,4 +36,31 @@ spec: # Output the standardized TEST_OUTPUT result in JSON form TEST_OUTPUT=$(jq -rc --arg date $(date -u --iso-8601=seconds) --arg RESULT "${RESULT}" --null-input \ '{result: $RESULT, timestamp: $date, failures: 0, successes: 1, warnings: 0}') - echo -n "${TEST_OUTPUT}" | tee $(results.TEST_OUTPUT.path) \ No newline at end of file + echo -n "${TEST_OUTPUT}" | tee $(results.TEST_OUTPUT.path) + - name: cypress-e2e-run + description: Run Cypress E2E tests + taskRef: + name: cypress-e2e + params: + - name: SNAPSHOT + value: $(params.SNAPSHOT) + - name: BONFIRE_IMAGE + type: string + description: The container Bonfire image to use for the tekton tasks + default: quay.io/redhat-services-prod/hcm-eng-prod-tenant/cicd-tools:latest + taskSpec: + params: + - name: SNAPSHOT + - name: BONFIRE_IMAGE + finally: + - name: ephemeral-cleanup + taskSpec: + steps: + - name: release-namespace + image: "$(params.BONFIRE_IMAGE)" + script: | + #!/bin/bash + set -e + echo "Releasing ephemeral namespace" + # this will fail as we don't have credentials to do this for now + release-ns.sh "foo" "bar"