Do Subversion and Bamboo applications need to be on the same machine ?
Asked by Brice PARMENTIER:

*This question is in reference to Atlassian Documentation: [Configuring source code management triggers for Subversion](https://confluence.atlassian.com/pages/viewpage.action?pageId=289277028)*

Hi,

I'm trying to set up a remote trigger for my plan from our Subversion server.

Documentation says the post-commit script must contain the following line:

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

But this suggest that the Subversion server is on the same machine than Bamboo. If I try typing the absolute path to the script in another machine, of course the script answers saying it can't find the path specified.

How to target the postCommitBuildTrigger.sh from another server?

Thanks


Answers:
author: rsperafico
body: Hello Brice,

Thank you for your inquire.

If you are using a remote SVN server, copy file "*atlassian-bamboo/repositoryScripts/svn-triggers/postCommitBuildTrigger.sh* " to the SVN repository *.../hook/post-commit* folder so that the *postCommitBuildTrigger.sh* file can be accessible from post-commit trigger file.

Edit the Subversion repository's `hooks/post-commit `trigger file with something like:

```
/path/to/postCommitBuildTrigger.sh http://localhost:8085/api/rest/updateAndBuild.action?buildKey=PROJ-PLAN
```

See below for more information about the scripts. Please refer to [Configuring source code management triggers for Subversion](https://confluence.atlassian.com/bamboo/configuring-source-code-management-triggers-for-subversion-289277028.html).

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support

comments: author: Brice PARMENTIER
body: Thanks for this answer ! I will try this but before on last question : I guess that as I'm running all under Windows, I need to use the .py file instead of the .sh file, right ?


author: rsperafico
body: Yes, in this case you would be using the Python version instead (.py). Please, make sure you have Python installed and available to your system in the PATH environment variable.

You will notice *postCommitBuildTrigger.py* has a script written and an example on how to use it.


author: Brice PARMENTIER
body: Thanks for your answer !

I forgot to tell that I'm running all under Windows...

Answer to EDIT2: there is a postCommitBuildTrigger.py in the same folder under Bamboo installation. It seems to be doing the same stuff. Maybe I can target this one instead.


author: Radu Dumitriu
body: How about running ssh remotely?

    ssh user:pwd@bambooserver '`/path-to-your-bamboo-installation/scripts/svn-triggers/postCommitBuildTrigger.sh base-url BUILD-KEY`'

Of course, it's better to generate a trusted relationship between the servers, so use

    ssh-keygen -t rsa -b 2048

    ssh-copy-id user@bambooserver

```
(check the ssh manual)

```

Edit:

Windows, heh? Nevermind, use OpenSSH or cygwin (that beast is nice too). Open SSH may be easier to set up, though.

Edit2:

Uh-oh! I just realized you will need a cygwin anyway (it's a sh) on that Windows.


Tags: svn