How to change workspace and build record Root Directory on Jenkins?

前端 未结 8 1861
野趣味
野趣味 2020-11-29 05:35

I would like Jenkins\' data to be written to drive \"E:\" since this is the large drive on the server. Jenkins itself is installed on \"C:\".

How do I do that?

8条回答
  •  再見小時候
    2020-11-29 06:32

    EDIT: Per other comments, the "Advanced..." button appears to have been removed in more recent versions of Jenkins. If your version doesn't have it, see knorx's answer.

    I had the same problem, and even after finding this old pull request I still had trouble finding where to specify the Workspace Root Directory or Build Record Root Directory at the system level, versus specifying a custom workspace for each job.

    To set these:

    1. Navigate to Jenkins -> Manage Jenkins -> Configure System
    2. Right at the top, under Home directory, click the Advanced... button:
    3. Now the fields for Workspace Root Directory and Build Record Root Directory appear:
    4. The information that appears if you click the help bubbles to the left of each option is very instructive. In particular (from the Workspace Root Directory help):

      This value may include the following variables:

      • ${JENKINS_HOME} — Absolute path of the Jenkins home directory
      • ${ITEM_ROOTDIR} — Absolute path of the directory where Jenkins stores the configuration and related metadata for a given job
      • ${ITEM_FULL_NAME} — The full name of a given job, which may be slash-separated, e.g. foo/bar for the job bar in folder foo


      The value should normally include ${ITEM_ROOTDIR} or ${ITEM_FULL_NAME}, otherwise different jobs will end up sharing the same workspace.

提交回复
热议问题