How Plans are Considered

The repository is expected to pass a JSON payload providing the  substring of the linked repository URL configured in a Bamboo linked repository. 


The plugin will then trigger all active plans using that repository ("team one") which may include multiple repositories in bamboo if configured at lower project-level paths ({"project-one","project-two"}).

Be careful when using post-commit script in subversion

The first argument $1 provided to post-commit represents the repository path as seen by the server side's process. In most configurations this is usually the file path.


The server's Repository path provided by default '$1' does not equal the URL configured in bamboo. You must alter the value before passing it to bamboo to be a substring of the configured path.

Alternately, you can simply hard-code the top-level URL path on each repository once. (even automated jobs should know the repo name/path at provisioning time)



Users and bamboo plan are using an endpoint like https://svn.mycompany/team-one-repo/project-path/trunk 

But the server's svn process sees the path to the directory on the server, /var/svn-repositories/team-one-repo

Therefore a post-commit script to work on all repos would need to update the default argument before POSTing it to the plugin. This assumes a standard config on many servers/repositories. Otherwise simply hard code it (even automated jobs should know the repo name/path at provisioning time)!

post-commit (to work agnostically on many repos)

repoPath=$1 # remember this is the FS path as seen by the SVN tool, NOT the FQDN seen by the user. You may need to append to the proper host/protocol
#repoPath = "/var/svn-repositories/team-one-repo"
$repoContext=${repoPath#/var/svn-repostories} #strips off the front
#repoContext = "/team-one-repo"

curl -X POST "http://localhost:6990/bamboo/rest/linkedrepositorytrigger/1.0/commit" -d '{"path":"'$repoContext'"}' -H "Content-type: text/json"