Jenkins修改workspace和build目录
Jenkins: Change Workspaces and Build Directory Locations
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}/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.
Jenkins修改workspace和build目录的更多相关文章
- Jenkins报错Caused: java.io.IOException: Cannot run program "sh" (in directory "D:\Jenkins\Jenkins_home\workspace\jmeter_test"): CreateProcess error=2, 系统找不到指定的文件。
想在本地执行我的python文件,我本地搭建了一个Jenkins,使用了execute shell来运行我的脚本,发现报错 [jmeter_test] $ sh -xe D:\tomcat\apach ...
- vue-cli脚手架build目录中的dev-server.js配置文件
本文系统讲解vue-cli脚手架build目录中的dev-server.js配置文件 这个配置文件是命令npm run dev 和 npm run start 的入口配置文件,主要用于开发环境 由于这 ...
- 【转】eclipse修改workspace
[转]eclipse修改workspace 以下方法选其中一种 1.进入 Window > Preferences > General > Startup and Shutdown ...
- Jenkins修改默认主目录及数据迁移
前言 在使用Jenkins做持续集成的初期,未能预估项目量的大小.于是乎,配置都是使用的默认配置,而Jenkins的默认主目录放在了服务器的根目录下. 随着时间的推移,项目量的持续增加,在运维过程中就 ...
- 一个完整的JENKINS下的ANT BUILD.XML文件(Jenkins可以参考)
一个完整的JENKINS下的ANT BUILD.XML文件 <?xml version="1.0" encoding="UTF-8"?> <p ...
- linux下修改tomcat的默认目录
1.修改tomcat的默认目录.它的默认目录是webapps/ROOT,对应的conf目录下的server.xml里的内容是: 1.修改tomcat的默认目录.它的默认目录是webapps/ROOT, ...
- 直接修改workspace下的配置文件与tomcat下的文件
项目中直接修改workspace下的配置文件与tomcat下的文件,可是还有错误,例如修改了4个配置文件中的一个配置文件.经查如下: 直接修改workspace下的配置文件与tomcat下的文件,可能 ...
- Jenkins修改管理员密码
前言:Jenkins修改管理员密码,我看了网上所有的教程,竟然全都是拿着一串已经加密好的111111的密文去替代config.xml文件里面的密码,然后大家的密码都是111111!我觉得这种做法实在太 ...
- 修改 docker image 安装目录 (解决加载大image时报错:"no space left on device")
修改 docker image 安装目录 (解决加载大image时报错:"no space left on device" ) 基于Ubuntu16.04 docker版本: 17 ...
随机推荐
- Eclipse常用注释设置
菜单:Window→Preferences→Java→Code Style→Code Template Files /** * @Title: ${file_name} * @Package ${pa ...
- 从零开始学 Web 之 jQuery(一)jQuery的概念,页面加载事件
大家好,这里是「 从零开始学 Web 系列教程 」,并在下列地址同步更新...... github:https://github.com/Daotin/Web 微信公众号:Web前端之巅 博客园:ht ...
- AWS DevOps – 配合Jenkins和CodeDeploy实现代码自动化部署
AWS DevOps – 配合Jenkins和CodeDeploy实现代码自动化部署 Amazon ElastiCache 连接至 Redis 节点 通过 AWS Command Line Inter ...
- nginx介绍(五) - 高可用
前言 即便想 nginx 这么牛B的服务器, 也不能保证他不挂啊, 就算不是机器出故障, 比如, 停电了, 那么机器挂了, 很正常啊. 这时候, 没有分发服务器, 网站就不能正常访问了, 咋搞? 网站 ...
- 全文搜索引擎 Elasticsearch 入门
1. 百科 ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.Elasticsearch是用Java开发的,并作 ...
- (转)eclipse上传项目到码云
把Eclipse项目上传到码云的步骤: 1.登录码云:新建项目 2.输入项目名: 3.空项目创建成功如下图: 4.右键点击Eclipse的项目,选择“Team”—————->“Share Pro ...
- PHP四大基本排序算法实例
PHP四大基本排序算法包括:冒泡排序法,快速排序法,选择排序法,插入排序法. 1. 冒泡排序 思路分析:在要排序的一组数中,对当前还未排好的序列,从前往后对相邻的两个数依次进行比较和调整,让较大的数往 ...
- SpringBoot自动配置注解原理解析
1. SpringBoot启动主程序类: @SpringBootApplication public class DemoApplication { public static void main(S ...
- vi/vim使用
移动光标上:k nk:向上移动n行 9999k或gg可以移到第一行 G移到最后一行下:j nj:向下移动n行左:h nh:向左移动n列右:l nl:向右移动n列 w:光标以单词向前移动 nw:光标向前 ...
- Make 输出重定向到文件
系统的输入与输出: 方式 描述符 含义 stdin 0 标准输入 stdout 1 标准输出 stderr 2 标准错误输出 把 make 输出的全部信息重定向到某个文件中: make <xxx ...