首页 > Windows开发 > 详细

How to change Jenkins default folder on Windows?

时间:2014-02-08 14:45:22      阅读:538      评论:0      收藏:0      [点我收藏+]

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

 

accepted
  • Stop Jenkins service
  • Move C:\Users\Coola\.jenkins folder to d:\Jenkins
  • Using regedit, change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Jenkins\ImagePath to "d:\Jenkins\jenkins.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)\Jenkins\jre\bin\java.exe for the java.exe in the new folder –  GarethOwen Nov 20 ‘12 at 13:29
add comment    

            

bubuko.com,布布扣 bubuko.com,布布扣

     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

How to change Jenkins default folder on Windows?

原文:http://www.cnblogs.com/flysun0311/p/3540097.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!