It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trigger bamboo when pull request is submitted.

Hi,

 

I would like to run build in bamboo(on master branch) when some branch was merged into master branch. I need it for uploading new artifacts into Nexus. I know that exists webhooks for these trigger but this is little bit dificult. We have Jira, Bitbucket and Bamboo and everything is linked. Exists better way for this trigger (after merge to master)? 

 

Thank you for help

 

Radek

1 answer

1 accepted

0 votes
Answer accepted
Jimmy Seddon Community Leader Apr 15, 2019

Hi Radek,

If I understand correctly you want a build to run only for the master branch when a pull request has been merged.

Do you allow changes to be made to the master branch if they don't come from a pull request?

I ask because you could make a clone of your current build plan that only watches for changes to the master branch and then builds and saves the artifacts whenever the master branch alone is updated.

-James

Do you allow changes to be made to the master branch if they don't come from a pull request?

 

No, we don't allow changes without pull request. How to set this watching for master branch? I can't see there this option.

 

Radek

Jimmy Seddon Community Leader Apr 15, 2019

Hi Radek,

You would define this in the linked repository.

LinkedRepository.JPG

Yes, I have it but how to run this plan after merge?

 

bamboo-repo.png

My triggers are empty and there is no option for triggering after merge.

Jimmy Seddon Community Leader Apr 15, 2019

Hi Radek,

On the build plan itself you will want to make sure you have a repository trigger setup there that uses your linked repository that should do what you want it to do.

BuildPlanTrigger.JPG

So, when is something new in master then this trigger is run? What do you have in tab Branches? I'm little bit confused with "Create plan branch". 

Jimmy Seddon Community Leader Apr 15, 2019

I don't have anything listed for branches in this plan.  By default the plan will run for the branch you have listed in the linked repository, there is no need to add a plan branch if master is all you plan to build with this.

I have following setting in branch. I don't know how to delete it.

 

branch.png

Jimmy Seddon Community Leader Apr 16, 2019

Hi Radek,

You don't need to delete that, those are the default setting which won't automatically create plan branches (hence the create plan branches 'manually').

You should be able to just merge a pull request into the master beanch and watch the new plan automatically pick up the new change and start building.

-James

Many thanks!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

691 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you