How to change Jenkins default folder on Windows?

后端 未结 7 621
谎友^
谎友^ 2020-12-13 17:27

How to change Jenkins default folder on Windows where Jenkins runs as Windows service. I want to change C:\\Users\\Coola\\.jenkins folder to d:\\Jenkins<

7条回答
  •  眼角桃花
    2020-12-13 18:03

    Apparently, grams' answer works but is not preferred. In Windows software and data/configuration files are supposed to reside in different places. This should be well known to Unix guys, it is basically like having a home directory. However, the wording with regard to JENKINS_HOME is broken anyways as setting an environment variable does not help despite what is being said in the help text.

    I used the procedure that is described here: http://tech.nitoyon.com/en/blog/2014/02/25/jenkins-home-win/

    Basically:

    1. Stop Jenkins service
    2. Edit entry in jenkins.xml in the Jenkins installation directory. This will be something like C:\Program Files (x86)\Jenkins. In your case value has to be set to d:\Jenkins
    3. Move Files from the installation directory to the new destination, d:\Jenkins, all except (some of them may not exist in a fresh installation)

      • jre folder
      • jenkins.err.log
      • jenkins.exe
      • jenkins.exe.config
      • jenkins.out.log
      • jenkins.war
      • jenkins.war.bak
      • jenkins.war.tmp
      • jenkins.wrapper.log
      • jenkins.xml

        1. Restart the service again.

提交回复
热议问题