Exporting existing plan configurations to Bamboo Specs

To ease migration of your Bamboo plans to configuration as code, we have prepared the export feature.

Note: This will not export historical data for the plans.


In order to export an existing build plan to Bamboo Specs source code:

  1. If you don't have Bamboo Specs project, create one
  2. Go to your build plan and select Actions > Configure plan.
  3. On the plan configuration page, select Actions > View plan as Java Specs.
  4. Copy generated Java code to your code editor by putting it in the PlanSpec#createPlan method for instance.

To export an existing deployment plan to Bamboo Specs source code:

  1. If you don't have Bamboo Specs project, create one
  2. Go to your deployment project and select ... > Edit project.
  3. On the deployment project configuration page, select ... > View project as Java Specs.
  4. Copy generated Java code to your code editor by putting it in the PlanSpec#createPlan method for instance.


The code is ready to run, with a few exceptions:

  • .credentials file needs to exist in the directory where the Bamboo Specs are run
  • manually created branches are not exported - you can add them manually in the UI

We advise you to cross-check the generated code with Bamboo Specs reference manual and to compare original and generated plan.

Sensitive data such as passwords or keys are exported as values encrypted using Bamboo's System-wide encryption algorithm. You will see BAMSCRT@0@... exported in place of the secret string. For details on generating encrypted secrets for new values, see Bamboo Specs encryption.

You will find equivalent classes for the vast majority of Bamboo concepts in the generated code, such as: plans, stages, jobs, tasks of different kinds, permissions, deployments. The export feature also handles tasks not known to Bamboo (e.g. third party plugins or a plugin written by you) via a generic AnyTask class.

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.

最終更新日 2020 年 7 月 24 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.