This is the documentation for Bamboo 5.6. View this page for the

Unknown macro: {spacejump}

of Bamboo, or visit the latest Bamboo documentation.

This page provides instructions on how to configure Subversion to send message events that trigger the execution of Bamboo plans. You only need to configure Subversion to send these message events if The repository triggers the build when changes are committed build strategy has been specified for one or more of your Bamboo plans.

Configuring Subversion to trigger a build

This section explains how to configure Subversion to trigger a build when the repository is changed. A Subversion hook script is used to perform the trigger action whenever a Subversion repository is changed.

The following commands and script files assume that your Subversion server runs on a UNIX- or Linux-based operating system. If your Subversion server runs on any other operating system, then you will need to modify the script files and if necessary, the commands below to suit that operating system.

Step 1. Enable the Subversion post-commit hook

To do this, run the following commands:

cd svn-repository-containing-the-build-source-code
cd into the hooks/ directory

The Subversion post-commit file is not installed by default. If it does not exist, make a copy of the post-commit.tmpl file in the hooks/ directory, name it post-commit and make it executable:

cp post-commit.tmpl post-commit
chmod a+rx post-commit

Step 2. Install the post-commit trigger

Add a line like the following to the post-commit file, for running Bamboo's build trigger script file.

/path-to-your-bamboo-installation/scripts/svn-triggers/postCommitBuildTrigger.sh base-url BUILD-KEY

where:

  • base-url is the base URL of the Bamboo server. For example:

    http://<name-of-machine>:8085
  • BUILD-KEY is the key of the Bamboo plan to be executed.

Make Bamboo's build trigger script file executable (using chmod) so that the Subversion user can execute it.

Step 3. Do a test commit

Conduct a 'test' commit. Bamboo should start building the relevant plan after a few seconds.

The Bamboo log file should contain an entry like this:

[INFO] com.atlassian.bamboo.build.UpdateAndBuild - Bamboo build was triggered by remote http call from 127.0.0.1

Notes

Build Trigger Security — Bamboo will only accept remote build triggers if the triggers originated from the Subversion server(s) identified in the Subversion Repository URL of any Bamboo plans. Requests originating from other Subversion servers will be rejected by Bamboo.

  • No labels

2 Comments

  1. Where might one find this magical trigger script? all these pages reference a script but do not point to one. I can't even find the trigger URL to hit for a plan.

    1. Eddie, try looking in the scripts folder of your Bamboo installation.