This page last changed on Oct 16, 2008 by alui.

A label is a convenient way to tag and group build results that are logically related to each other. Labels can also be used to define RSS feeds and to control build expiry.

Labels can be applied to build results automatically, by specifying the label(s) in a build plan (note that only Bamboo administrators can do this). Labels can also be applied ad hoc to build results by Bamboo users.



To specify labels for a plan's build results,

If you are creating a new plan, start at step 5.

  1. Click 'Home' to go to the Dashboard.
  2. Click the 'All Plans' tab.
  3. Locate the plan in the list and click this icon:
  4. The 'Configuration' tab will be displayed. Click the 'Post Actions' sub-tab.
  5. The 'Post Actions' tab will be displayed (see screenshot below).
  6. In the 'Regex Pattern' field, you can either:
  7. In the 'Labels' field, type the word (or multiple words, separated by commas and/or spaces) with which the plan's build results are to be labelled.
  8. Click the 'Save' button if you are editing an existing plan; or if you are creating a new plan, either click the 'Next' button and go to Specifying a Plan's Permissions or click the 'Summarise' button and go to Completing and Enabling a New Plan (hidden).


Screenshot: 'Post Actions' 





Regex example:

'There are \d+ results'

In the above regex, '\d+' represents any number with one or more digits. ('\d' means 'any digit', and '+' means 'one or more times'. When combined, they mean 'any sequence of one or more digits'.)

Therefore, positive matches would include:

  • 'There are 0 results'
  • 'There are 123 results'

Regex example with multiple labels:

You can use "capturing groups" with Bamboo 1.2.1 or later to create different labels for different purposes.

For example,

  • Enter the following into the 'Regex Pattern' field:
(PERFORMANCE_IMPROVED|PERFORMANCE_DETERIORATED)
  • Enter the following into the 'Labels' field:
\1

These settings will label your builds with PERFORMANCE_IMPROVED if "PERFORMANCE_IMPROVED" appears in the build log, and PERFORMANCE_DETERIORATED if "PERFORMANCE_DETERIORATED" appears in the build log. If both strings appear in a log, then both labels are applied to the build.



Document generated by Confluence on Mar 09, 2009 17:06