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
  • 相关阅读:
    iostream迭代器操作"txt文本文件"无法写入的思考
    Qt 相对路径 绝对路径
    "lambda"和“bind”的初步思考
    "partition"和“stable_partition”的思考
    "accumulate"的思考
    顺序容器“inset”的思考
    C++重载函数 const形参 引用指针 const_cast
    C++ 可变参数的函数
    JDK8流式处理常用例子
    JDK8时间新API
  • 原文地址:https://www.cnblogs.com/flysun0311/p/3540097.html
Copyright © 2011-2022 走看看