Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Specs - How to set custom plan branch for deployment project

Using Java specs, how can I set a custom plan branch for a deployment project?

In the UI this option is under `/deploy/config/configureDeploymentProjectDetails` .


If this is not possible, is it possible in any other way to mass configure different deployment plans for the same build plan  being ran on different branches?


Best Regards,



1 answer

1 accepted

1 vote
Answer accepted

Configure custom branch for deployment project through UI and then use menu item "View as Java Specs". It will generate Java code for current deployment project

Hello Alexey,


Thanks for the tip, I can see now that the PlanIdentifier ID number changes for each branch. This was not oblivious from the API. 


Thank you for your help!

After fiddling with this some more, this allows me to edit existing branches, but not to create new ones since I'm missing a BambooOid. Can this Id be retrieved somehow (using the API, or the GUI) from an existing build branch and not an existing deployment plan?

It's enough to use PlanIdentifier without oid

final Deployment rootObject = new Deployment(new PlanIdentifier("COM", "PLAN10")), "Test")
Like Pedro Sa da costa likes this

Unfortunately that does not work for me when creating a new deployment:

val deploymentName = "Tomcat Alpha deployment ${}"
val planIdentifier = PlanIdentifier(Vars.PROJECT_KEY, env.bambooPlanId)
Deployment(planIdentifier, deploymentName)

// error
// Can't find deployment project by oid(null) or name(Tomcat Alpha deployment TEST)

Vars.PROJECT_KEY,  and env.bambooPlanId match the IDs i can see in the bamboo plan generated java specs if I create it manually.

This error message is from deployment permissions import.

Are you sure it's related to plan branches selection from topic header?

Like Pedro Sa da costa likes this

You are correct! 

The problem was indeed from the permissions import. I was doing them before publishing the specs, which would cause an error when creating , but not when updating an existing plan.


Thank you for your help!

Suggest an answer

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

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

57 views 0 4
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