Defining plan variables

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.

Before you begin:

  • Note that plan variables override global variables with the same name.

To define a plan variable:

  1. Click Dashboard, then the All Plans tab, then the name of the plan in the list, to get to the plan you want to edit.
  2. Choose Actions > Configure Plan.
  3. Click the Variables tab.
  4. Add, update or delete plan variables, as desired:
    • Click Add to add a new variable once you have entered the key and value for it.
    • Updates to existing rows will be saved as you move between cells in the table.
    • Click the cross icon to delete a variable. Bamboo will ask you to confirm deletion.

Screenshot: Adding a plan variable


Was this helpful?

Thanks for your feedback!

8 Archived comments

  1. User avatar

    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)
    25 Feb 2013
    1. User avatar

      Xavier

      I second this request!

       

      And improvment request opened  BAM-15324 - Variables' value as dropdown list and input field Open ! Go there and vote/comment.

      02 Dec 2014
  2. User avatar

    Kris Gutta

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

    18 Mar 2013
    1. User avatar

      Xavier

      Kris Gutta : BAM-15324 - Variables' value as dropdown list and input field Open

      04 Mar 2015
  3. User avatar

    Marcus Lambert

    Can plan variables contain other variables ?

    19 Aug 2013
  4. User avatar

    Josh Graham [Atlassian]

    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.

    03 Sep 2013
    1. User avatar

      Anonymous

      also interested in this question. 

      18 Sep 2013
  5. User avatar

    Mark O'Brien

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

    20 Sep 2013
Powered by Confluence and Scroll Viewport