Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Do Subversion and Bamboo applications need to be on the same machine ?

Brice PARMENTIER January 13, 2016

This question is in reference to Atlassian Documentation: Configuring source code management triggers for Subversion

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

3 answers

0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 14, 2016

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.

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

Brice PARMENTIER January 14, 2016

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 ?

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 15, 2016

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.

0 votes
Brice PARMENTIER January 13, 2016

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.

0 votes
Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2016

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.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events