How to make trigger conditions branch friendly ?

Zein Makki February 8, 2019

Hello,

Scenario: We have a main bamboo plan (Source Build) that runs the source code build. We create a branch out of that.  We have other long running integration tests that also have branches configured. This looks like the following:

  • Source Build (master)
    • Source Build (Branch A)
  • Feature A (master)
    • Feature A (Branch A)
  • Feature B (master)
    • Feature B (Branch A)

We have scheduled triggers to run the integration tests multiple times a day. Now we chose the trigger condition to Only run Build if other Plans are currently passing and provided the plan key for plan (Source Build).

 

Now, it makes sense for Feature B (Branch A) to get triggered only if Source Build (Branch A) is passing successfully which is not the case. It seems that this trigger condition only checks for  Source Build (master).

Is this by design ? What is the rational behind this ? And is there any way to achieve the described behavior ?

1 answer

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2019

Hi! 

 

I have read your question, I can only suggest  you try use this one (child plan)

https://confluence.atlassian.com/bamboo/setting-up-plan-build-dependencies-289276887.html

or write in plan as final stages some automatisation based on rest api call https://docs.atlassian.com/atlassian-bamboo/REST/latest

 

Cheers,

Gonchik Tsymzhitov

Zein Makki February 10, 2019

Thank you for your kind response Gonchik.

The desired behavior is to have the branch plans run on schedule except if the Source Build plan branch is currently failing. If my understanding of child plans is correct, then it triggers plans in hierarchy mode one after the other which doesn't generate the same behavior (ability to run the plan every 1 hour for example in case the Source Build plan is successful). The intended behavior works perfectly in non-branched plans. Is there a place where I can ask if this is by design or maybe I need to submit a feature request/bug report ? (I know it is tricky to match branch plans by name in multi-branch environment)

 

How does the second approach help in this situation ? If I added some task to identify failing vs succeeding plans, then do I need to check for that thing in all the others plans as a first task ? Can you kindly elaborate on that second point.

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2019

I have not found the related issue, btw. you can try to find as well on this resource

https://jira.atlassian.com/browse/BAM-18417

 

Cheers,

Gonchik

Zein Makki February 11, 2019

The weird thing is that child plans respect the branch hierarchy.  If we add a dependency of plan B to plan A. Then when branch of plan A completes it triggers same branch name of plan B. So it seems the functionality exists, but not sure why it doesn't work for scheduled triggers. 

 

Can I open a bug in Jira.Atlassian for that ?

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2019

Hi! 

Let's start from support.atlassian.com

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events