Relocating JENKINS_HOME on Windows when installed as service

前端 未结 8 1063
野趣味
野趣味 2021-01-01 11:03

To free up space on C:, I would like to move my Jenkins data files (specifically the \\jobs directory) from the default installation directory

8条回答
  •  隐瞒了意图╮
    2021-01-01 12:03

    Pre Jenkins 2.121

    JENKINS_HOME is where Jenkins is installed which is not what you want to change. After you start up Jenkins, go to:

    1. Manage Jenkins
    2. System Configuration
    3. Click the first "advanced" button

    This gives you text fields where you can change the directory for the workspace and builds directories. Those are the two directories that use a good bit of disk space. Note that it will not move history. If you want to move the existing workspaces/etc, you'll need to manually copy them over.

    Post 2.121 You have to set properties (not through the UI). The system property to use is jenkins.model.Jenkins.buildsDir.

    https://jenkins.io/doc/upgrade-guide/2.121/#ui-option-for-custom-builds-and-workspace-directories-on-the-master-has-been-removed https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties

提交回复
热议问题