Bamboo create plan using add on

Hi, i am using a trial of the Bob swift CLI to automate the creation of plans. but that tool is really expensive and im only using one of its commands. Thus a feels like a waste at that price. The API does not support the creation of plans so the only other option is creating my own Add On. Any pointers on this please how it can be done and whether it is possible and even worth it? 

Thanks in advance

2 answers

2 accepted

This widget could not be displayed.

Take a look at Bamboo Specs released in Bamboo 6.0, I believe this is what you are looking for.  It allows you to represent your plans as a code and submit that code to a running Bamboo instance to get your plan created/updated.  

Hope that helps, 

thanks for your awnser. can specs be used to create a new project in bamboo? 

This widget could not be displayed.

While you could certainly achieve this by developing a Bamboo add-on, I think it is not worth the effort anymore, given the new Bamboo Specs are readily available in Bamboo 6 to programmatically create (and maintain) plans via configuration as code:

Configuration as code is now available in Bamboo! You can start storing your build plan configuration as code for easier automation, change tracking, validation, and much more. Read all about other benefits of using configuration as code in Bamboo Specs. We've also prepared a tutorial that will help you create a simple plan in no time. For behind-the-scenes information about the Bamboo Specs library, see our detailed reference documentation.

Here's an example (the Bamboo Specs reference has more details):

private Plan createPlan() {
    return new Plan(
            project(),
            "Plan Name", "PLANKEY")
            .description("Plan created from (enter repository url of your plan)")
            .stages(
                    new Stage("Stage 1")
                            .jobs(new Job("Run", "RUN")
                                    .tasks(
                                            new ScriptTask().inlineBody("echo Hello world!"))));
}

thanks for your answer aswell, will defnitely try it out. one last question can specs be used to create a new project in bamboo?

So to get it straight, specs can be used in an external program such as java and contact a bamboo instance on your network?

 

Can specs be used to create a new project in bamboo?

Certainly, have a look at the Project reference.

Specs can be used in an external program such as java and contact a bamboo instance on your network?

Yes, that's in fact the main operation modus right now - for example, if you create a Bamboo Specs progam via a Maven archetype as per the tutorial, you will get an executable Java program that does just that.

Awesome, maven is perfect, ill post back if i have any more questions, thanks so much for quick responses.

Morning Steffen,

So i followed the tutorial and bamboo specs is great ! thanks so much for the suggestion. one last thing in the documentation it says a plan can do this :

"Specifies who has permission to view and configure the plan and its jobs."

but i cant seem to find this functionality in the methods that plan has. Do you have any knowledge whether its possible to give a specific user/users access to this newly created plan/project using specs?

Regards 

Good catch, hadn't realized that phrase yet - given the Bamboo Specs API reference has no notion of permissions either as of release 6.0.1, I'm afraid that's one of the still not supported aspects, like notifications and deployment projects.

And now that I state this, I seem to recall that permissions have indeed been mentioned to be missing still at Summit Europe 2017, maybe Piotr can conmment on this and a resp. ETA?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

54 views 1 0
Join discussion

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