We have a fairly lengthy deploy process for our site. Our first step includes checking whether environment tentacles are connected and if they are not, remove them. We’re assuming that AWS has replaced these instances. If we find a tentacle that is Not Connected, but we know the AWS EC2 (server) is still alive, something has gone very wrong and we want to terminate the deploy immediately. I know I could call the cancel api from a step, but is there cleaner way of doing this?
Thanks for reaching out. Assuming you are doing all those checks using scripts (Powershell, C# or Bach), you could throw an exception which would prevent the deployment from moving further down the steps list.
Thanks for your reply, Dalmiro. I tried throwing an exception from within a process step just now. It stopped running the “Success: only run when previous steps are successful” steps, but it still ran the “Failure: only run when a previous step failed” steps. Is there a way to bail-out immediately under certain conditions?
If you want to prevent all steps from running (including the ones that should only run on failure) you’re gonna have to do it through the API.