Deploy.ps1' returned non-zero exit code: 1. Deployment terminated

My Octopus deployments have just started getting this error: Deploy.ps1’ returned non-zero exit code: 1. Deployment terminated and no changes to the deployment code have been made.

When I run the scripts manually on the target server I get no errors and even though I get the error above everything actually installs/configures correctly

See below for the difference between when it errors out and when it succeeds.


The logs are not being very helpful and best guess is that the last part missing is from PostDeploy.ps1 which only contains this code:

Write-Host "PostDeploy"
$environment = $OctopusParameters["Environment"]
Write-Host "Environment: '$environment'"

Any idea on how to troubleshoot this further?
This is the raw log:

Hi there

Thanks for getting in touch! Sorry to see you’ve started getting errors here.

Can you give me a bit more information about your deployment process? The best bet would be export the deployment process as json and send that through.

Also, is the deploy.ps1 a file you’ve written? Is it included in your package? Can you send me through the contents of these files?

Finally, can you please send me the full raw log?

Look forward to getting to the bottom of this.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.