Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Is there a way to set the default branch in Bamboo that is NOT "master" Edited

Is there a way to set the default branch in Bamboo that is NOT "master". I want to set it to the default feature branch that we're working on. We encounter issues when building sometimes building Master by accident instead of the expected feature branch. How do we change the default branch? 

1 answer

1 accepted

0 votes
Answer accepted
Jimmy Seddon Community Leader May 06, 2019

Hi Adam,

You can change this on the Linked Repository if you want the default to always be the feature branch, we actually don't release from master so I rarely have that set in the linked repo:

LinkedRepository.JPG

If you want this to be more of a temporary thing while you are working on the feature branch you may want to consider using Plan Branches, which will create a "copy" of the main build plan that is linked to it but it only builds a given feature branch.  You can find out more information about those here:

https://confluence.atlassian.com/bamboo/using-plan-branches-289276872.html

I hope that helps!

-James

Hi James - I actually want a bit of both. 

 

I read through the docs you provided on your second answer and it did not assist me in what I require.


When I changed the "default branch" in BitBucket it did not reflect in "Bamboo". So when I click on the app the default branch that appeared on the page was still "Master". Whilst it did work on BitBucket - I want it to actually work in Bamboo

 

I want to continuously change the default branch so that everytime I go to build the branch that appears on this section here is ALWAYS the current feature branch we are working on. 

 

Screen Shot 2019-05-07 at 9.41.52 am.png

Jimmy Seddon Community Leader May 07, 2019

Hi Adam,

I should have clarified, the first screenshot I provided is actually from within Bamboo.  If you go to the Administration cog and select "Linked Repositories".  This will bring you to a listing of all BitBucket repositories you have linked in Bamboo.  Then select the repository that you which to change the default branch for and my screenshot should make sense from there.

If you change the branch from within Bamboo, that should change the main branch that the build plan is built with,

I hope that helps!

-James

Hi James - thanks for the clarification and the follow up much appreciated!!

Unfortunately we're working with many applications so I'm worried this would interfere with other plans. As the "Linked Repositories" state:

"Repositories defined here are available to every plan. You can select these repositories in plans configuration. Changes to them will be applied to every plan that uses them."

The section I've highlighted worries me as I'm not aware of whether or not this will interfere with other projects using the same Bamboo. 

Jimmy Seddon Community Leader May 08, 2019

Hi Adam,

So you have two options here:

1) You can create a new linked repository that uses a different name but links to the same repo and uses a different default branch (I have done this myself for the exact reason you have listed above)

2) You can check the "Usages" Tab on the linked repository to see all the Build Plans and Deployment Environments that reference/make use of that linked repository:

LinkedRepoUsage.JPG

I hope that gets you what you are looking for.

-James

** SOLUTION ** 

Hi James wow sorry i thought I replied to this with my solution. So I was actually able to solve this by doing the following if you refer to the screen shot below. It's been working fine since the noticeable differents are the feature branches have changed naming convention in Bamboo.

They now have feature/2.0 <-- with the`/` character rather than the `-` character. Also I have encountered different issues running it with this "default branch" that is triggering other branches but I believe that is project specific - still investigating however not affecting my desired result.


I really appreciate your help James! Thank you kind sir! 

 

 

Screen Shot 2019-05-09 at 5.01.02 pm.png

Jimmy Seddon Community Leader May 24, 2019

Hey @Adam Sir,

I'm glad you were able to get everything working!

Have a great day-James

Suggest an answer

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

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

223 views 4 6
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