Trigger Bamboo merge from another plan

WET August 27, 2019

I have a Bamboo with plan1 and plan2. On plan1 I have a branch master and backup. backup has an old status of master.

I want now when I run my plan2 to do there some stuff and afterwords to checkout/merge the master into backup and all to be pushed on the origin. Is this doable?

One more thing, I cannot use the auto mergeable checkbox, because that will mean to merge the master branch on backup branch every time when I run plan1 manually.

I tried to find anything on the Bamboo REST API, but nothing seems to be the right thing Bamboo API.

1 answer

1 accepted

0 votes
Answer accepted
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 29, 2019

Hi @WET

I think I'll need more details to really understand what is plan2 doing in this case.

  • Is plan2 using the same repositories of plan1?

If plan2 is using different repositories, the best course of action seems to be using a script task for this merge and running the checkout/merge commands there. The problem here is that you will need to manage the credentials or add them in the Bamboo agents that need to do the work. If you restrict plan2 to run only on local agents you would only need to add the right SSH keys in the Bamboo server.

Does that sound like an option for you?

WET August 29, 2019

It's a separat repository. This sounds like the only option, which isn't pretty at all. It's strange that I cannot set a trigger for that.

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 29, 2019

It's a separat repository. This sounds like the only option, which isn't pretty at all.

I agree this is not a pretty solution, but I don't see a better option now.

We have this old (and not very popular, low votes) to create a merge task for git.
[BAM-11552] Task for merging between git branches. It should be an option to solve this issue since we already have the Push and Commit tasks.

 

 It's strange that I cannot set a trigger for that.

It looks like you have a different idea on how this could work.

  • Do you want to create a feature request for the trigger you think Bamboo should have?
    If that is the case, please give me more details so I can write a feature request for it.
WET August 29, 2019

It looks like you have a different idea on how this could work.

  • Do you want to create a feature request for the trigger you think Bamboo should have?
    If that is the case, please give me more details so I can write a feature request for it.

So I know that bamboo has the automated merge, there I would build another option, some radio button maybe -> default and custom trigger, where default is the exact action as now and the custom trigger you will wait for a signal X, then merge. 

Then you can send from another plan (when it builds) a signal X to the initial plan.

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 30, 2019

Hi @WET

It seems a rather complex implementation for a case that doesn't look common.

Could it be just an option (like a checkbox) where we can avoid the merge if the build was triggered manually or by a parent (that was also triggered manually)?

My intention is to add a feature request that has more chances to be implemented and used by other users.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events