zoukankan      html  css  js  c++  java
  • How to change Jenkins default folder on Windows?

    http://stackoverflow.com/questions/12689139/how-to-change-jenkins-default-folder-on-windows

    accepted
    • Stop Jenkins service
    • Move C:UsersCoola.jenkins folder to d:Jenkins
    • Using regedit, change HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesJenkinsImagePath to "d:Jenkinsjenkins.exe"
    • Start service
    share|improve this answer
     
                                                               
    The answer helped. In addition, I had to wipe out the workspaces of all my jobs which use the tfs plugin to get the source code. This was failing with 'Unable to determine the workspace' error. –  GarethOwen Nov 20 '12 at 10:37
    3                                                                                    
    I also had to add a new Inbound Rule to Windows Firewall, just duplicating the existing one for c:Program Files (x86)Jenkinsjreinjava.exe for the java.exe in the new folder –  GarethOwen Nov 20 '12 at 13:29
    add comment    

                

         up vote     3     down vote    

    When you read Administering Jenkins you can read all options how to modify the JENKINS_HOME environment variable.

    On this website you can read how to configure you Tomcat container to override the JENKINS_HOME environment variable, they advise to create the file $CATALINA_BASE/conf/localhost/jenkins.xml, with the following content:

    <Context docBase="../jenkins.war">
        <Environment name="JENKINS_HOME" type="java.lang.String" value="/data/jenkins" override="true"/>
    </Context>
    
    share|improve this answer
     
       
    add comment    

         up vote     2     down vote    

    And in addition to grams answer, the most important part is creating an environment variable named JENKINS_HOME with value "D:Jenkins". Without that, on starting Jenkins it would again create the .jenkins folder in your user home folder.

    share|improve this answer
     
    1                                                                                    
    It may not be necessary. AFAIK it seems that the native windows installer does not create (or need) JENKINS_HOME environment variable. Check out issue #JENKINS-13530 But I guess it's safer to check JENKINS_HOME anyway. –  grams Oct 3 '12 at 14:02
    1                                                                                    
    You don't need the Windows installer to install Jenkins as a service. You can also simply run the WAR and then select it from the menu. And in that case your right, it isn't necessary, since Jenkins creates a jenkins.xml file, which sets the current directory as JENKINS_HOME. –  dunni Oct 3 '12 at 15:11
    add comment
  • 相关阅读:
    20201015-3 每周例行报告
    20201008-1 每周例行报告
    20200924-2 功能测试
    贺敬文2019102936-1总结
    20191114-1 每周例行报告
    20191107-1 每周例行报告
    20191031-1 每周例行报告
    每周例行报告
    20191017-1 每周例行报告
    每周例行报告
  • 原文地址:https://www.cnblogs.com/flysun0311/p/3540097.html
Copyright © 2011-2022 走看看