Jenkins (Hudson) SVN checkout dir

In Jenkins (Hudson), how do I change the location of a project check.

I want the project to be checked on doc-root from apache2, which is located in /var/svn/project by default Jenkins checks it on /jobs dir on /lib/jenkins/

I was thinking of running a shell command to copy the extracted code from the job folder to the root directory, but it will copy the entire folder even if its one file has been modified.

Should I look at rsync or can Jenkins do this (even with the plugin)

+6
source share
2 answers

Jenkins has the ability to change the location of your workspace ...

On the job configuration page in the "Advanced project settings" section, click the "Advanced" button.

Check the box next to "Use custom workspace" and specify the place where you want you to log out.

+9
source

There is no option for this in the Jenkins SVN plugin. However, I was able to achieve this on Windows using the Junction Link directory - and you could do the same when installing * nix with a symlink.

In particular, I wrote down the Jenkins / myjob / workspace directory and did it

 mklink /J junction_to_working_copy c:\my\real\working\copy 

then in the Jenkins project Subversion setup (in the "Source Control" section) for the "Local module directory (optional)" field, which I entered:

 junction_to_working_copy 

It does a good trick

+1
source

Source: https://habr.com/ru/post/896280/


All Articles