From 7182ca27ecc0432b3ee5142fdca2359fde092d69 Mon Sep 17 00:00:00 2001 From: Beppe Vanrolleghem Date: Tue, 24 Mar 2020 10:17:24 +0100 Subject: [PATCH] deploy app error handling --- Tekton/tasks/deploy-app.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tekton/tasks/deploy-app.yaml b/Tekton/tasks/deploy-app.yaml index b88f68f..4583b36 100644 --- a/Tekton/tasks/deploy-app.yaml +++ b/Tekton/tasks/deploy-app.yaml @@ -39,6 +39,10 @@ spec: printf "replacing deploy version in yaml file failed, please check if the yaml file is in the correct location ($(params.yaml-location))" > /tekton/results/description exit 0 fi + kubectl delete -f /source/$(params.yaml-location) + if [ "$?" != 0 ]; then + echo "nothting to worry abt, just means its been manually deleted before this was run" + fi kubectl $(params.command) -f /source/$(params.yaml-location) if [ "$?" != 0 ]; then printf "failure" > /tekton/results/state