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?
Thanks
Hello Russ,
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?
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.