Stopping Deployment If Predeployment Script Fails

Would like to stop the deployment or Octopus should not continue deployment if predeployment powershell script fails. Is it possible to do that and if it is possible how can we do that?

Kindly please help me

Hi,

Thanks for reaching out. If you simply Throw or write-error in your Powershell script, Octopus will fail that step and end the deployment (as long as you don’t have steps that are set to “run if previously steps failed”

Hope that helps,
Dalmiro