Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,459,361
Community Members
 
Community Events
176
Community Groups

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,

Pedro

 

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 ${env.name.toUpperCase()}"
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
TAGS

Atlassian Community Events