I am new to bamboo but have not been able to find info anywhere on what I am trying to do.
In a task I am running a powershell script to deploy database changes. In that PS script it calls invoke-sqlcmd to execute a sql script. However, if that sql script fails for any reason the entire task still completes successfully. Is there any way to cause the task to fail if the script errors?
I know that Bamboo uses return code for Script Task to determine if it should fail the build. So one solution that comes to my mind would be to tweak your powershell script to detect if invoke-sqlcmd has failed/errored, and if so - exit 1 or exit something different than 0. 0 return code means to Bamboo "I'm a successful task, please don't fail me".
Is that helpful to you?
Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs