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 ...
随机推荐
- Zabbix系列之二——添加监控主机步凑
1.登录监控平台,配置——主机——创建主机 2.主机设置 3.添加模板
- 【Eclipse】添加builder实现NDK的自动编译
最近在做NDK相关的东西,Eclipse里面java的自动编译很方便,每次改动后就能自己编译显示错误,而NDK的C/C++文件就需要保存后再手动点build. 研究了下发现java code的自动编译 ...
- C# sqlhelper 整理
以下代码是参考几个不同人的写法总结写成的,肯定还有很大的优化空间,暂存该版本:有建议的欢迎提出: using System; using System.Collections.Generic; usi ...
- Java NIO中的缓冲区Buffer(二)创建/复制缓冲区
创建缓冲区的方式 主要有以下两种方式创建缓冲区: 1.调用allocate方法 2.调用wrap方法 我们将以charBuffer为例,阐述各个方法的含义: allocate方法创建缓冲区 调用all ...
- 从零开始学 Web 之 Vue.js(一)Vue.js概述,基本结构,指令,事件修饰符,样式
大家好,这里是「 从零开始学 Web 系列教程 」,并在下列地址同步更新...... github:https://github.com/Daotin/Web 微信公众号:Web前端之巅 博客园:ht ...
- TCP/IP 笔记 - 超时和重传
TCP协议为了提供可靠的数据传输服务,会启动数据重传来解决下层网络层(IP)可能出现的数据包丢失. 超时重传介绍 TCP重传由两套独立机制来完成重传,基于时间的超时重传(RTO,TCP发送数据时会设置 ...
- docker 日志方案
docker logs默认会显示命令的标准输出(STDOUT)和标准错误(STDERR).下面使用echo.sh和Dockerfile创建一个名为echo.v1的镜像,echo.sh会一直输出”hel ...
- PHP 网页数据api采集
一个简单的数据采集,这里用的方法是API数据采集 //api地址,读取文本 $result = file_get_contents("https://feed.mix.sina.com.cn ...
- elasticsearch6.7 05. Document APIs(4)Delete API
3.Delete API delete API 可以让你删除一个特定id的文档,下面例子删除twitter索引中_doc类型.id为1的文档: DELETE /twitter/_doc/1 返回结果: ...
- Fundebug是这样备份数据的
摘要: 数据还是要备份的,万一删库了呢? 本文代码仓库: fundebug-mongodb-backup 引言 今年8月,腾讯云竟然把客户前沿数据的数据弄没了,Fundebug在第一时间进行了一些简单 ...