Search code examples
svnhudsonlampproduction-environment

Hudson Shellscript for exporting Sourcecode from SVN repository into production folder


I have one dedicated server which has the whole Lamp-Stack, SVN and Hudson installed. I would like to create a freestyle Hudson job, that gets the latest sourcecode out of my SVN-repository and puts it into my /var/www/myWebApp Folder.

How does the shell script need to look like?

EDIT

When I just use

svn export myRepoURL myWebAppFolder

i get an erro, stating:

Started by user anonymous
Reverting http://myIpAdress/repos
Updating http://myIpAdress/repos
At revision 2
no change for http://myIpAdress/repos since the previous build
[workspace] $ /bin/sh -xe /tmp/hudson7864414135197533508.sh
+ svn export http://myIpAdress/repos/myRepo
/var/www/myWebApp
Authentication realm: <http://myIpAdress> Subversion Repository
Password for 'hudson': Authentication realm: <http://myIpAdress> Subversion Repository
Username: svn: PROPFIND request failed on '/repos/myRepo'
svn: PROPFIND of '/repos/myRepo': authorization failed (http://myIpAdress)
Finished: FAILURE

Solution

  • It should look something like below

    svn export [your svn URL] /var/www/myWebApp

    Do let me know if I am missing something here ?