Jenkins(Hudson) SVN checkout dir

18,782

Solution 1

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.

Solution 2

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

Share:
18,782
heshanh
Author by

heshanh

Updated on August 16, 2022

Comments

  • heshanh
    heshanh almost 2 years

    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 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)

  • Amit
    Amit about 11 years
    My scripts are there in the custom build workspace.. But I want to checkout in separate dir ? it says absolute path is not allowed. How can I do that ?
  • Sagar
    Sagar about 11 years
    Jenkins will always check out to your workspace - whether it is the default, or a custom workspace. I'm not sure what you mean by your scripts are in the workspace but you want to check out to a different area.