To free up space on C:
, I would like to move my Jenkins data files (specifically the \\jobs
directory) from the default installation directory
Having the same problem and not wanting to change the whole %JENKINS_HOME%
location, I came across the answer by adil ameen
Modify the config.xml
file in %JENKINS_HOME%
(typical under C:\Program Files (x86)\Jenkins).
Change
and
to your desired folder.
You can use the following placeholders: ${JENKINS_HOME}
, ${ITEM_ROOTDIR}
, ${ITEM_FULL_NAME}
. As specified at Features controlled by system properties under jenkins.model.Jenkins.buildsDir
Mine looks like this:
D:/jenkins/jobs/${ITEM_FULL_NAME}/workspace
D:/jenkins/jobs/${ITEM_FULL_NAME}/builds
Reload the configuration through the Jenkins UI via Jenkins
-> Manage Jenkins
-> Reload configuration from disk
You can even keep your build history if you copy the old jobs to the new location.