博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Jenkins修改workspace和build目录
阅读量:6473 次
发布时间:2019-06-23

本文共 2292 字,大约阅读时间需要 7 分钟。

Jenkins: Change Workspaces and Build Directory Locations

 转自: 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 the
Advanced… 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}/workspace and 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.

转载地址:http://bsvko.baihongyu.com/

你可能感兴趣的文章
修改OBS为仅直播音频
查看>>
OCA读书笔记(3) - 使用DBCA创建Oracle数据库
查看>>
CKEditor的使用-编辑文本
查看>>
puppet来管理文件和软件包
查看>>
Python基础进阶之路(一)之运算符和输入输出
查看>>
阻塞非阻塞异步同步 io的关系
查看>>
ClickStat业务
查看>>
DMA32映射问题
查看>>
POJ 1269 Intersecting Lines(判断两直线位置关系)
查看>>
spring3.0.7中各个jar包的作用总结
查看>>
Windows 10 /win10 上使用GIT慢的问题,或者命令行反应慢的问题
查看>>
梯度下降(Gradient descent)
查看>>
Windows平台分布式架构实践 - 负载均衡
查看>>
最容易理解的对卷积(convolution)的解释
查看>>
《机器学习实战》知识点笔记目录
查看>>
完美解决NC502手工sql的查询引擎排序及合计问题
查看>>
windows 7/mac编译cocos2d-x-3.2*的android工程报错
查看>>
MYSQL导入导出.sql文件(转)
查看>>
《信息安全系统设计基础》 课程教学
查看>>
Linux平台下使用rman进行oracle数据库迁移
查看>>