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
This commit is contained in:
Honza Pokorny 2019-01-14 10:24:38 -04:00
parent b19daa966f
commit 17709257fb

View File

@ -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