Exporting existing plans to Bamboo Specs
This feature is in the beta phase
Because of that, the generated code might not be complete or work properly.
The generated code may not contain all required tasks:
- you may see a "Support for <task name> coming soon" inline comment for some of them,
- you may see a generic AnyTask class used for some of them.
The generated code may also miss required parameters or features (e.g. plan permissions and manually created branches are not supported at the moment) or have compilation errors. It means that a plan created by Bamboo Specs code may differ from the original plan.
Cross-check the generated code with Bamboo Specs reference manual and make sure to compare original and generated plan.
To ease migration of your Bamboo plans to configuration as code, we have prepared the export feature. In order to export existing plan to Bamboo Specs source code:
- If you don't have Bamboo Specs project, create one.
- Go to your plan and select Actions > Configure plan.
- On the plan configuration page, select Actions > View plan as Bamboo Specs.
- Copy generated Java code to your code editor by putting it in the PlanSpec#createPlan method for instance.
You may want to refactor the code generated, for instance: split code into smaller methods, extract common parts or merge code from several Bamboo plans into one Bamboo Spec project.