From 97f4ec71b44b9e2a373fe56b52b9e5b5f7b7228e Mon Sep 17 00:00:00 2001 From: stakater-user Date: Tue, 10 Oct 2023 09:14:36 +0000 Subject: [PATCH] [skip ci] Add rendered and modified Helm chart --- .../stakater-remove-environment-0.0.6.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 stakater-remove-environment/rendered/stakater-remove-environment-0.0.6.yaml diff --git a/stakater-remove-environment/rendered/stakater-remove-environment-0.0.6.yaml b/stakater-remove-environment/rendered/stakater-remove-environment-0.0.6.yaml new file mode 100644 index 00000000..09b3655f --- /dev/null +++ b/stakater-remove-environment/rendered/stakater-remove-environment-0.0.6.yaml @@ -0,0 +1,34 @@ +--- +# Source: stakater-remove-environment/templates/clustertask.yaml +apiVersion: tekton.dev/v1beta1 +kind: Task +metadata: + name: stakater-remove-environment-0.0.6 +spec: + description: Remove an Environment CR if pipeline fails before / on update-cd-repo. + params: + - description: Pull request number + name: PR_NUMBER + type: string + - default: environment/environment.yaml + description: 'path in workspace' + name: PATH_IN_WORKSPACE + type: string + steps: + - args: + - '-c' + - | + set -e + if [ $(params.PR_NUMBER) != "NA" ]; then + echo "Deleting Environment" + oc delete -f $(workspaces.output.path)/$(params.PATH_IN_WORKSPACE) --wait=true && echo Success || echo Fail + else + echo "Not a PR, Environment wasnt generated" + fi + command: + - /bin/bash + image: 'stakater/pipeline-toolbox:v0.0.31' + name: remove-environment + resources: {} + workspaces: + - name: output