[英]How to run jobs on different machines using Jenkins using Node Label parameter?
I am using jenkins for a series of jobs : 我正在使用詹金斯做一系列工作:
Job 1 -> Job 2 -> Job 3 -> Job 4 -> Job 5. 作业1->作业2->作业3->作业4->作业5。
I am using the NodeLabel Parameter plugin where I specify the linux terminal name : 我正在使用NodeLabel Parameter插件,在其中指定linux终端名称:
cdfr008:linux.machine.com
Now Job 3 is a tricky guy which is a bat command that needs to be run on windows machine gdtshs.windows.machine.com
现在Job 3是一个棘手的家伙,这是一个bat命令,需要在Windows计算机
gdtshs.windows.machine.com
上运行
In the configuration of the Job 3 , I checked 在Job 3的配置中,我检查了
"Restrict where this project can be run"
“限制可以在哪里运行该项目”
and set the Label expression under it to : gdtshs.windows.machine.com
并将其下的Label表达式设置为:
gdtshs.windows.machine.com
However my job still fails as it picks up the parameter of Node that was passed from Job 1 ie cdfr008:linux.machine.com
但是,我的作业仍然失败,因为它获取了从作业1传递的Node参数,即
cdfr008:linux.machine.com
Restrict where this project runs options doesnt override the Node Label parameter. 限制此项目在何处运行选项不会覆盖“节点标签”参数。
Is there a solution where I could specify the nodes for Job 1,2,4,5 but ensure Job 3 is run on Windows on a different machine ? 有没有一种解决方案,我可以为作业1,2,4,5指定节点,但要确保作业3在其他计算机上的Windows上运行? What plugin do I need for it ?
我需要什么插件?
And if possible , could I run Job 3 (windows) and Job 4 (linux) in parallel. 如果可能的话,我可以并行运行Job 3(Windows)和Job 4(linux)。
将节点名称更新到属性文件中,并将其注入Job3中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.