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?
Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot