Dashboard > Pulse v1.2 > ... > Project Post Build Actions > Project Run Executable Post Build Actions
  Pulse v1.2 Log In | Sign Up   View a printable version of the current page.  
  Project Run Executable Post Build Actions
Added by Jason Sankey, last edited by Jason Sankey on Dec 01, 2006  (view change)
Labels: 
(None)

Pulse Manual Index

Overview

A run executable post build action can be used to run an arbitrary command on the pulse™ master after a build completes. The command can be passed arguments based on the build details using the variables described below. A possible use case for this post build action is to trigger a custom notification mechanism (lava lamps anyone?).

Configuration

command

The executable to run, either as an absolute path or the name of an executable in the PATH for the pulse™ master process.

This field is required.

examples

/usr/local/bin/my-notification-script.sh

arguments

A space-separated list of arguments to pass to the command. To include spaces in an argument, you may escape them with a backslash (\), or surround the argument in double quotes ("..."). To include a literal backslash or double quote, escape with a backslash (e.g. \\, \"). The arguments may include any of the variables below:

Variable Description
project The name of the project built.
number The build number or id for the build.
specification The name of the build specification built.
status The build status as a lower case string.
revision The revision of the source checked out for the build.
reason The reason for the build (contains spaces).
test.summary Summary of test results for the build (contains spaces).
build.dir Absolute path of the directory where the build is stored.
stage.<name>.agent Name of the agent the stage executed on.
stage.<name>.recipe Name of the recipe executed for the stage.
stage.<name>.status The stage status in lower case.
stage.<name>.dir Absolute path of the directory where the stage is stored.
stage.<name>.command.<name>.status The command status in lower case.
stage.<name>.command.<name>.dir Absolute path of the directory where the command is stored.

Variables are refered to using the ${...} syntax, as used in pulse files. Variables specific to a particular build stage are prefixed with "stage.<name>." where <name> is the name of the build stage (e.g. "stage.default."). For a specific command within a stage, the prefix has an additional "command.<name>." where <name> is the name of the command (e.g. "stage.default.command.build").

Build properties

Build properties defined on the build specification are also available.

Understanding the variables

To help illustrate the names and values of the available variables, an example set of variables will be displayed for the most recent successful build.

Examples

Pass some relevant details to a custom notification command as separate arguments:

${project} ${specifiation} ${number} "${reason}" ${status} "${test.summary}"

Pass the directory containing files for an artifact named "reports" produced by command "test" in stage "default":

"${stage.default.command.test.dir}/reports"

Pass any argument with spaces:

"this is a single argument"

Zutubi wiki is Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators