Jenkins奴隶工作区 [英] Jenkins slaves workspaces

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

问题描述

我有一个Jenkins多配置项目,我想在位于两个不同VM上的两个从站(从站1和从站2)上构建.我对Jenkins如何尝试为每个从属创建不同的工作区存在疑问.我想在每个VM上使用相同的工作空间路径.

I have a Jenkins multi-configuration project that I want to build on two slaves (Slave-1 and Slave-2) which are located on two different VM's. I am having a problem with how Jenkins attempts to create different workspaces for each slave. I want to use the same workspace path on each VM.

我从Perforce获取我的项目文件,并希望将它们放在两个VM的目录c:\ workspace中.但是,当我运行构建时,我查看具有Slave-1的VM,并将其存储在以下项目文件中:

I am getting my project files from Perforce and want to put them in the directory c:\workspace on both VM's. However when I run a build, I look on the VM that has Slave-1 and it stores the project files under:

c:\ workspace \ label \ Slave-1

c:\workspace\label\Slave-1

在其他VM上,项目文件位于:

On the other VM the project files is under:

c:\ workspace \ label \ Slave-2

c:\workspace\label\Slave-2

在c:\ workspace下的文件夹'label'是我在配置矩阵中输入的从属名称.

The folder 'label' under c:\workspace was the slave name I input for the configuration matrix.

如何覆盖Jenkins,将项目文件放置在每个VM上的c:\ workspace下(不带\ label \ Slave_name文件夹)?我知道Jenkins这样做是为了避免混淆,但是我的工作区位于完全不同的VM上,它们不会以任何方式相互交互.我必须使用c:\​​ workspace目录才能正确构建.

How do I override Jenkins to put my project files under c:\workspace on each VM (without the \label\Slave_name folders)? I understand Jenkins does this to avoid confusion but my workspaces are on completely different VM's that won't interact with each other in any way. I have to use the c:\workspace directory in order to build properly.

推荐答案

您可以使用其他参数启动Jenkins:

You can start Jenkins with extra params:

-Dhudson.model.Slave.workspaceRoot=c:\workspace

来自这里: https://issues.jenkins-ci.org/browse/JENKINS-12667

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

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