Bamboo Tear Down in case of build failure

I have a Bamboo setup that runs some Unit tests that access a set of services. I start those services before Unit Tests run( as a Job) and in case of a Unit Test failure the Job after unit tests (Job 4 below ) which Stop the services are not run.

Is there a way where irrespective of a Build result there can be a tear down called that I can use to stop all services.

Note: All this is being run using a single agent and single stage with multiple jobs in that stage.

Job1 - Start Services

Job2 - Checkout code

Job3 - Run maven clean install

Job4- Shutdown services

1 answer

Not sure, but you may be able to use the pre-post build plugin to do that. Checkout the plugin info in the marketplace.

It looks to me (upon very cursory review) that this might do the trick. It is a free plugin. No idea if it works or not. I don't currently use it myself.

https://marketplace.atlassian.com/plugins/com.sysbliss.bamboo.plugins.prepost-build-command

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

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...

1,321 views 0 5
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you