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
  • 相关阅读:
    中文字符串怎么按拼音比较大小(转)
    C语言的面向对象技术(转)
    学校网又不行了哇。人人也上不了了。
    POJ2255Tree Recovery
    myeclipse无法编译java源文件(转)
    SQL语句中JOIN的用法(转)
    POJ3094Quicksum
    ssh_exchange_identification: Connection closed by remote host 问题的解决 (转)
    56视频网除了广告都看不了了
    java实现微信扫一扫详解
  • 原文地址:https://www.cnblogs.com/flysun0311/p/3540097.html
Copyright © 2011-2022 走看看