如何在 Jenkins 节点上设置工作区根目录? [英] How to set the workspace root directory on Jenkins nodes?

查看:24
本文介绍了如何在 Jenkins 节点上设置工作区根目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,Jenkins 节点上的作业将存储在 [Remote FS root]workspace 中.

By default, jobs on a Jenkins node will be stored in [Remote FS root]workspace.

目前,[Remote FS root] 设置为 D:,所以我的作业位于 D:workspace.由于 Windows 上 255 个字符的限制,我需要我的作业目录直接位于驱动器的根目录.

Currently, [Remote FS root] is set to D:, so my jobs are in D:workspace. Due to the 255-characters limit on Windows, I need my job directories to be directly at the root of the drive.

如何将工作区根目录设置为D:?

How to set the workspace root directory to D:?

推荐答案

我们需要在 Jenkins 主节点启动时指定如下参数:

We have to specify the following argument on startup of the Jenkins master node:

-Dhudson.model.Slave.workspaceRoot=D:/

为此,请在 $JENKINS_HOME 中找到 jenkins.xml 配置文件并完成 <arguments></arguments>部分.

To do so, find the jenkins.xml configuration file in $JENKINS_HOME and complete the <arguments></arguments> section.

这篇关于如何在 Jenkins 节点上设置工作区根目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆