Via the Java Api can I programatically update plan branch configuration

Hello,

Every time I create a new Git branch for a new sprint I want to update the Plan Branch's Source Repository Branch value to the newly created branch. For example sprint/2 is the current branch name and there's now a new branch called sprint/3 that I wish to update it to.

My Plan Branches are fixed. I DO NOT want to have automatically generated plan branches when new git branches are detected (which I used to do but my plan branch variables needed to be updated in the newly generated plan branch and that became too much manual work)

So I would like to create a simple Java program that will iterate over all my plans and update the sprint plan branches to the new git branch. Is this possible? I saw the docs (https://docs.atlassian.com/atlassian-bamboo/latest/) which were frankly overwhelming for a non-developer and I was hoping someone could point me in the right direction to get me started

Many thanks

1 answer

0 votes

In your case it would be easiest if submitted the action /branch/admin/config/editChainBranchRepository.action?buildKey=YOUR_BRANCH_NAME and captured what gets sent to the server using FireBug or some other plugin.

Using that data, you'll be able to create a Java program (or even a simple script that uses curl - http://curl.haxx.se/) that updates the branch name to what you want.

Thanks for this but I have captured a lot of data and not really sure how that helps me in any way? Any other clues please?

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,064 views 0 5
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot