By default, jobs on a Jenkins slave will be stored in [Remote FS root]\workspace\
.
Currently, [Remote FS root]
is set to D:\
, so my jobs are in D:\workspace\
. Due to the 255-characters limit on Windows, I need my job directories to be directly at the root of the drive.
How to set the workspace root directory to D:\
?
We have to specify the following argument on startup of the Jenkins master node:
To do so, find the
jenkins.xml
configuration file in$JENKINS_HOME
and complete the<arguments></arguments>
section.It seems that, at least on Windows, this is not actually true.
I'm running Jenkins 1.480.3, and my slaves are run via
jenkins-slave.exe
andjenkins-slave.xml
on Windows nodes.Neither the XML file nor the service parameters store any path information, and *the
workspace
directory is created at the location of thejenkins-slave.exe
, which is the same as the setting underhttp://server/jenkins/computer/node_name/configure
->Remote FS root
the help for which reads:So it seems it is actually possible to set the
workspace
on the slave via the Jenkins FS root for the slaves.Also related: https://issues.jenkins-ci.org/browse/JENKINS-12667