Cancelling deploy from PS script

Hello.

Is there a way to cancel deploy from running PS script?

Alexander

Hi Alexander,

Thank you for reaching out! Yeah that’s definitely possible! We have a script available written by one of our team members, so you’re more than welcome to use it.

I hope that helps!

Kenny

Sorry, maybe I was not clear. I would like to cancel deploy task from inside. Like I am running deploy.ps1 and by calling some kind of function I would like to cancel it.

Alexander.

Hi Alexander,

There’s no built-in function at the moment, but its not such a bad idea. I’ve created a Uservoice suggestion for it. Please try to drop by and drop some votes to it if you’d like to see it implemented in future versions.

For the time being the above script is the only way. You could definitely use it on a deployment, or even create a script module that uses it and simply invokes it calling ‘stop-OctopusDeployment’. More info on how to create script modules.

Best regards,

Kenny

Notice:

This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.