When configuring a plan, you may want to specify variables to be used in the build process. For details on how variables are used, see Bamboo variables.

Plan variables are one type of variable that is available to you. A plan variable is defined for one specific plan, and has the same value every time that plan is built. If you want to define a variable across all plans rather than a single plan, define a global variable as described in Defining global variables.

Plan variables can be accessed by using ${bamboo.varName}. Plan variables can also be overridden at runtime when running a manual build. For more information, see Running a plan build manually.

始める前に

  • プラン変数は、同じ名前のグローバル変数をオーバーライドします。

プラン変数を定義するには、次の手順に従います。

  1. [Dashboard (ダッシュボード)] をクリックしてから、[All Plans (すべてのプラン)] タブ、リスト内のプランの名前を順にクリックして、編集するプランに移動します。
  2. [アクション] > [プランを構成] を選択します。
  3. [Variables (変数)] タブをクリックします。
  4. 必要に応じて、プラン変数を追加、更新、または削除します。
    • キーと値を入力したら、[Add (追加)] をクリックして新しい変数を追加します。
    • 既存の行の更新は、テーブルのセル間を移動すると保存されます。
    • Click the trash can to delete a variable.

スクリーンショット: プラン変数の追加


  • ラベルなし

6 Comments

  1. Radosław Antoniuk

    It would be really useful to be able to define:

    • a variable with a set of possible options (i.e. dropdown during running of the plan)
    • requirements - i.e. to mark that this variable is required to proceed with running of the plan
    • dynamic default value - e.g. that the variable is getting the default value from the current build number)
  2. Kris Gutta

    Is there any plans to make the values a select list instead of free form?

  3. Marcus Lambert

    Can plan variables contain other variables ?

  4. JoshA

    Important to note that the value set by the Plan Variable Updater task only takes effect on the next build, and the variable has to have been defined for the Plan Variable Updater task to be able to set the variable.

    1. Anonymous

      also interested in this question. 

  5. Mark O'Brien

    Can variables be defined or modified by tasks during the build?