From 17709257fb10ae38498d93d330c01e51accf3626 Mon Sep 17 00:00:00 2001 From: Honza Pokorny Date: Mon, 14 Jan 2019 10:24:38 -0400 Subject: [PATCH] Don't fail when undeploying and the stack doesn't exist Before attempting to delete the stack, we check if it exists. And if it doesn't, we skip straight to updating the environment. Change-Id: I4124f73571cd794a457f52d4f76bfb75cf64e886 --- workbooks/deployment.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/workbooks/deployment.yaml b/workbooks/deployment.yaml index d51316ab9..87ab39867 100644 --- a/workbooks/deployment.yaml +++ b/workbooks/deployment.yaml @@ -666,7 +666,18 @@ workflows: message: "Deleting <% $.container %> deployment" execution: <% execution() %> plan_name: <% $.container %> - on-complete: delete_stack + on-complete: stack_exists + + stack_exists: + action: heat.stacks_get + input: + stack_id: <% $.container %> + publish-on-error: + deployment_status: UNDEPLOYED + message: "Stack does not exist: <% task().result %>" + status: SUCCESS + on-success: delete_stack + on-error: send_undeployed_message delete_stack: workflow: tripleo.stack.v1.delete_stack