Is there a bamboo variable with the build job's result? I cannot find one in the docs...
I have this situation:
1. In the first stage I need to start a server.
2. In every subsequent stage, if the job or jobs suceed, I need to leave the server running for the next stage
3. After the last server related stage, I'll have a final stage to shutdown the server.
The problem is, between 1.) and 3.), if any job fails I need to shutdown the server because the build will never get to the final cleanup stage.
I have a cleanup script I want to put into each job's 'final task', but if the job succeeded I want to skip the final task so the build can go on to the next stage WITHOUT DOING CLEANUP.
According to the docs, the 'final task' is always run, so I have to put a conditional in the script called from the final task so I can leave the server running if the job succeeded, and kill the server if the job failed.