How to trigger another plan when parent plan failed.

Hi Guys,

I have plan A and plan B in bamboo . I want trigger plan B when plan A failed to do some roll back job. Is that possible or should I add any plugins?

Best Regards.

2 answers

0 votes
Marcin Oles Atlassian Team Aug 04, 2015

Hi @Wu.Allen,

I don't think this is currently possible using existing dependencies mechanism or predefined triggers.

https://confluence.atlassian.com/display/BAMBOO/Setting+up+plan+build+dependencies
https://confluence.atlassian.com/display/BAMBOO/Triggering+builds

However, build triggers are now pluggable (since ~5.8 I think) and there might be a plugin that does what you are looking for. Unfortunately I don't know of any. And I'm not sure if implementing custom triggers in Bamboo is documented.

An alternative solution would be to add the rollback as a stage in the same build plan, if it's not very advanced. You could add some conditions to all tasks if they should or should not be executed (e.g. all logic can be done within a script task, which could just read a variable or look through artifacts produced by previous stages and decide what to do). But this seems like an ugly workaround, not what you're trying to achieve.

Cheers,
Marcin 

Hi MO, As jenkins can do that with a plugin https://wiki.jenkins-ci.org/display/JENKINS/BuildResultTrigger+Plugin ,is there any plugin can be added into bamboo to do that?

Marcin Oles Atlassian Team Aug 05, 2015

Like I said, it is possible to write such plugin, but I currently don't know of any plugin that can do that. You can create a feature request under https://jira.atlassian.com/projects/BAM. Also, you can try searching the Atlassian Marketplace: https://marketplace.atlassian.com/

0 votes

Hello @Wu.Allen,

You can try plugin I created to show how to create new trigger. It's not tested nor supported officially by Atlassian. Look at https://bitbucket.org/chystoprudov/bamboo-failtrigger-plugin/overview.

I'll be happy if it will solve your use case

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

490 views 0 9
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