[Bamboo Knowledge Base]
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.
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.
To do this, run the following commands:
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:
Add a line like the following to the
post-commit file, for running Bamboo's build trigger script file.
base-url is the base URL of the Bamboo server. For example:
BUILD-KEYis 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.
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:
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.