Overview
Post build actions are tasks carried out when a build of a project completes. The tasks may optionally be restricted to chosen build specifications and build states. For example, you may only want the task to run for successful nightly builds. Post build actions are typically not used for build notifications, as pulse™ provides a flexible and user-centric notification system (see User Subscriptions for details). However, the email committers and run executable actions may be used for notifications if desired.
Adding Post Build Actions
Post build actions can be added to a project by clicking the "add new action" link at the bottom of the "post build actions" table on the "configuration" tab for the project. This link launches the post build action wizard, which will prompt you for common action details and an action type. Depending on the type selected you may be asked to provide further details. The common fields are described below.
name
A descriptive name for the action.
Examples
type
The type of action to perform, one of:
| Type |
Description |
| apply tag |
Applies a tag or label to the built revision in the project's SCM. |
| email committers |
Sends a notification email to users that committed changes that affected the build. |
| run executable |
Runs an arbitrary command when the build completes. |
Refer to the page of the chosen type when completing subsequent steps of the wizard.
apply to specifications
Shows a list of build specifications in the project, allowing the action to be restricted to selected specifications. If no specifications are selected, the action will apply to all builds of the project. If one or more are selected, the action will only be performed after builds of those specifications.
restrict to states
Shows a list of completed build states to restrict the action to. If no states are selected, the action will be run regardless of the build result. If one or more states are selected, the action will only be run if the build completes in one of the selected states.
Examples
To apply a tag to the built revision only if the build succeeds, then select "success". This tag will then indicate the last known successful revision.
fail build on error
If checked, a failure to execute the action will mark the build as a failure. Typically the post build action is considered outside the scope of the build result, so you should leave this option unchecked. However, if the action must succeed for the build to pass, you may select this option.
Managing Post Build Actions
Existing post build actions may be managed via the "post build actions" table on the "configuration" tab for a project. To edit an existing action, clik the "edit" link in the corresponding row of the table. Refer to the descriptions above and the page for the specific action type for field details. To delete an action, click the "delete" link in the corresponding row of the table.