Exporting existing plans to Bamboo Specs

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

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:

  1. If you don't have Bamboo Specs project, create one
  2. Go to your plan and select Actions > Configure plan.
  3. On the plan configuration page, select Actions > View plan as Bamboo 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 few exceptions:

  • sensitive data is not exported  - you will see "/* PUT YOUR SENSITIVE INFORMATION HERE*/" code comment to fill up the data
  • 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.

 

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.

最終更新日 2018 年 3 月 21 日

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

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