Octo and postdeploy script for Azure web app deployment


I am building our java api in bamboo. I am using Octo to create release and deploy the release as well.
everything is working.
I want to add a post deploy validation step where I smoke test my web api.
If I add postdeploy.ps1 to my Octopus deploy package will it be executed?
More importantly will Octo.exe show a failure if my smoke test fails so bamboo can make the build as failed.
What do I have to do in my post depoy powershell script to throw an error so Octo knows that script failed.



Thanks for reaching out!

If your smoke test script returns an error/exception when your test goes wrong, that should mark the deploy step as failure, which should be notified right away to Octo.exe.

Something like throw "something went wrong" or write-error "something went wrong" should be enough to make the step fail.

Give both at try and let me know how it goes.


I added a PostDeploy.ps1 script to my package.
I updated the process step to perform variable substitution necessary to determine which URL to use for health check.
I caused an intentional failure by defining an invalid URL variable in Octopus Deploy.
My deployment failed but Bamboo did not know about it.
So it seems to me the Octo depoy-release command is not getting an error back when PostDeploy.ps1 fails.
Octopus deploy logs show failure and it does make the deployed as failed.

Let me know if you have any more suggestions.

Are you calling Octo.exe deploy-release with the --progress flag from bamboo? IF you are not, try doing it and let me know if that works.

I was using Octo.exe but I was not using --progress flag.
Adding --progress flag helped and a failed health check results in a failed build.
Thanks for your excellent support as usual.