Windows中的Jenkins工作区设置问题 [英] Jenkins workspace settings issues in Windows

查看:725
本文介绍了Windows中的Jenkins工作区设置问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows10Pro(x64)-构建计算机上安装了Jenkins 2.121.1的最新稳定版本.

I have the latest stable release of Jenkins 2.121.1 installed on my Windows10Pro(x64)-build machine.

问题1:

我找不到此线程中显示的系统范围的工作区设置: 如何更改工作空间并在其上构建记录根目录詹金斯?

I can't find the system-wide workspace settings as shown for instance in this thread: How to change workspace and build record Root Directory on Jenkins?

此内容是否已删除?我只有适用于特定作业的工作区设置,但是我想在系统级进行更改.

Has this been removed? I only have the workspace settings available for the specific jobs, but I would like to change it on a system-wide-level.

问题2:

当我为特定作业配置自定义工作区时,如下所示:

When I configure the custom work space for a specific job like so:

应该使用我创建的项目的名称.相反,它实际上是使用该名称创建一个文件夹,如下所示:

It is supposed to use the name for the item that I've created. Instead it LITERALLY creates a folder with this name, like so:

即使jenkins文档说我应该使用"$ {ITEM_FULL_NAME}",但我尝试了其他变体(ITEM_FULLNAME)等.

Even though the jenkins documentation says I should use "${ITEM_FULL_NAME}", I've tried different variants (ITEM_FULLNAME) etc.

推荐答案

它看起来像个错误

他们提到了高级"标签下的内容,但我也找不到它.

They mention Under the Advance Tab but I don't find it anywhere either.

解决方法

直接修改jenkins.xml 来自

Modify the jenkins.xml directly from

  <env name="JENKINS_HOME" value="%BASE%"/>

<env name="JENKINS_HOME" value="newPath\Jenkins"/>

考虑第二个问题,您可以修改config.xml

Considering the 2nd issue you can modify the config.xml

您可以在启动jenkins.war时设置env变量

You can set the env variable when you start the jenkins.war

 SET JENKINS_HOME=new\Path\directory
 SET ITEM_ROOTDIR=new\root\directory

 java -jar jenkins.war

每次启动和停止服务时都必须这样做

You will have to do this each time you start and stop the services

这篇关于Windows中的Jenkins工作区设置问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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