开发者

Jenkins(Hudson) SVN checkout dir

开发者 https://www.devze.com 2023-03-31 17:51 出处:网络
In Jenkins (Hudson) how do i change the checkout location of a project. I want the project to be checked out to the doc-root of apache2 which isat /var/svn/project

In Jenkins (Hudson) how do i change the checkout location of a project.

I want the project to be checked out to the doc-root of apache2 which is at /var/svn/project by default Jenkins checks it out to the /jobs dir on /lib/jenkins/

I thought of running a shell command to copy 开发者_Python百科the checked out code from jobs folder to the doc-root but it'll copy the entire folder even if its a single file that has been changed.

Should i look in to rsync or can Jenkins do this (even with a plugin)


There is an option in Jenkins to change the location of your workspace...

On the job configuration page, under the section "Advanced Project Options", click the "Advanced" button.

Check the box near "Use custom workspace", and fill in the location where you want your check-out to go.


There is no option for this in the Jenkins SVN plugin. I was, however, able to achieve it on Windows with a directory Junction Link - and you could do the same on a *nix installation with a symbolic link.

Specifically, I cd'ed into the Jenkins job/myjob/workspace directory and did this

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

then in the Subversion configuration of the Jenkins project (under Source Code Management) for the "Local module directory (optional)" field I entered:

junction_to_working_copy

This does the trick well enough

0

精彩评论

暂无评论...
验证码 换一张
取 消