Jenkins: Change Workspaces and Build Directory Locations
2017-08-14 07:46
459 查看
转自: http://ingorichter.blogspot.jp/2012/02/jenkins-change-workspaces-and-build.html
Have you ever wanted to change the location of the workspace directory of a Jenkins job? Not enough space on your hard drive or your hard drive is too slow? Whatever the reason might have been for your wish, there is a simple solution. Every job in Jenkins
has a well “hidden”, I mean really not so obvious, setting to modify the Workspace root location of the job. To change this location, you need to configure your job and click on theAdvanced… button in the “Advanced
Project Options” section.
Once you opened the settings, you will find some more configuration options for your job. Look for the “Use custom workspace” option on the right hand side and check the box.
Here is some information that you should consider reading, prior to change the workspace.
Important: The next build will use the new location, but you have to manually relocate all the existing content from the previous location.
Globally Changing the workspace location for all Jobs
In order of changing the workspace for a single job, there is another option in the Jenkins system settings that allows for changing the workspace for every job.Navigate to Jenkins->Manage Jenkins->Configure System and click on the AdvancedButton on the right hand side.
Voilà! This opens up the following options section
Now you can change your workspace and build directory to any other location on your machine. Jenkins provides 3 predefined variables that can be used to specify the new location:
${JENKINS_HOME} — Jenkins home directory
${ITEM_ROOTDIR} — Root directory of a job for which the workspace is allocated
${ITEM_FULLNAME} — ‘/’-separated job name, like “foo/bar”
The default value for the “Workspace Root Directory” is
${ITEM_ROOTDIR}/workspaceand for the “Build Record Root Directory” it’s
${ITEM_ROOTDIR}/builds.
Some Notes
Please be aware, that if you change your workspace to a different location, the contents of the “old” workspace directory are not copied over to the new workspace.Doing this on OSX could require to change the owner of the newly created workspace. So, if you encounter permission issues during your next build, then have a look at the new location.
相关文章推荐
- eclipse server locations disabled and need to change to use tomcat installation
- Maven skip unit test and build to directory
- jenkins安装github插件后还是找不到 Build when a change is pushed to GitHub
- jenkins找不到Build when a change is pushed to GitHub
- Howto change all file and directory in a folder to 777?
- Auto-Build, Deploy and Notify with Jenkins
- jenkins groovy postbuild print and example 打印消息和log收集例子
- Jenkins Build Goals and options vars
- gparted and how to change /home directory to a new partition
- build and install everything into local directory
- How To Build xfstools, xfsprogs And xfsdump From Source On Ubuntu
- Os bootup and stop working when the / directory is ful
- you must configure in a separate build directory
- U盘the file or directory is corrupted and unreadable
- (OK) Adding a New Device - for company build and product teams only
- Advanced daily build - Auto update build number and lable the source code and bin output
- 怎样控制Qt标题栏(How can I handle events in the titlebar and change its color etc ? )
- delphi的文件夹监控控件,直接封装成可视化的控件,拖一下即可代码。核心为:ReadDirectoryChangesW
- VC++文件监控(一) ReadDirectoryChangesW
- build boost_1_48 on ubuntu and windows