For each Job of a Plan, you can (as an option) specify a 'post action' label that can be applied to the Job's build results automatically after (or 'post') each build of that Job.
Automatic labelling of Job builds is a 'post action' feature (i.e. performed at the completion of Job builds), which is built into Bamboo itself. There are a number of third-party plugin modules available that can provide additional post actions (e.g. the Pre-Post Build Command plugin). You can also write your own plugins to provide additional post actions for a Job. See the Bamboo Plugin Guide for further details.
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.
On this page:
To specify labels for a Job's build results:
Screenshot: 'Post Actions'
A simple 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:
A 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, the following 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.
(PERFORMANCE_IMPROVED|PERFORMANCE_DETERIORATED)
\1
2 Comments
Anonymous
Mar 02, 2011This is really quite inconsistent. The screenshot shows the use of bracket characters in the regex ("*{PERFORMANCE_IMPROVED|PERFORMANCE_DETERIORATED}"), but the written documentation below it shows the use of parentheses ("(PERFORMANCE_IMPROVED|PERFORMANCE_DETERIORATED)*"). Additionally, the text regex pattern ('There are \d+ results') shows the use of straight quotes, which seems to be at odds with the previous examples.
I realize Bamboo uses the regexp functions from Java, but I think showing a few basic examples of some common-scenario expressions (e.g. matching some string pattern - "some string exists here" - against the build logs and producing a label from that) would go a long way here, since this is one of the more difficult areas of Bamboo to get working properly.
Anonymous
Jan 17, 2012I agree, this bit of documentation is not sufficient.