Skip to end of banner
Go to start of banner

Configuration as Code

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Story

We have been on a journey with Plan Creation Scripting for almost 2 years to realize the goal of having Bamboo configuration as code. Internally, we have 100's of plan configurations under source control with the ability to deploy them to multiple Bamboo servers in an instance. It has proven to be an highly productive endeavor. We made the investment to create these script from scratch and, in the process, significantly improved the performance and reliability of our builds. We are probably on our 3rd generation of major improvements in our plan construction including standardization, common elements, support tools, and more maintainable scripts.

Now there has been a major advances with Bamboo CLI 6.4 with the addition of exportPlan and the ability to kick start configuration from source.

Atlassian Endorses Configuration as Code for Bamboo

With Bamboo 6.0, has made the initial steps to support Configuration as code with the release of Java based configuration source. They have articulated the advantages of this approach - Advantages of Configuration as Code.

Options

SourceBambooAdvantages
Java6.0 and higher
  • Provided by Atlassian
  • Finer grained access for more complete and complex requirements
  • Well suited for teams with Java programming
CLI5.10 and higher
  • Higher level abstraction
  • Same syntax as dynamic plan modifications and related automation
  • Individual actions enable better problem determination
  • Option to continue past individual errors on plan creation or modification

Export Existing Plans

Whatever option you choose, the new Bamboo CLI exportPlan action can help you with your journey and automation.

EAP - exportPlan is marked experimental in 6.4

  • Atlassian considers export to java as beta for Bamboo 6.0 - export may be incomplete or not able to be imported without changes
  • Export plan to CLI is new in Bamboo CLI 6.4 and has some limitations as well in terms of completeness that will be addressed mostly in release 6.5


Export to Bamboo Specs Java
--action exportPlan --plan EXAMPLE-PLAN --type java --file example.java
Export to CLI Script
--action exportPlan --plan EXAMPLE-PLAN --file example.txt

Export All Plans With One CLI Action

One action will export all your existing plans to a directory. Alternatively, be more selective by doing this by project and using regex based filtering on names. 

Export to CLI Script
--action runFromPlanList --project @all --common "--action exportPlan --plan @plan@ --type java --file export/@project@/@plan@.java"
or 
--action runFromPlanList --project @all --common "--action exportPlan --plan @plan@ --file export/@project@/@plan@.txt"
  • No labels