[英]How to copy build XMLs from Master to the Slave node in Jenkins?
I have created a Jenkins job which used to run in the master and I have the build.xml
file in the master. 我创建了一个可以在母版中运行的Jenkins作业,并且在母版中有
build.xml
文件。
Now I have added a slave node and added the setting Restrict where this project can be run
so that my job always runs on a particular slave. 现在,我添加了一个从属节点,并添加了设置“
Restrict where this project can be run
以便我的作业始终在特定的从属上运行。
Now my build jobs are failing and I can see: 现在我的构建作业失败了,我可以看到:
[EnvInject] - Loading node environment variables.
Building remotely on demo_slave_inst2 (slave1) in workspace /root/slave/workspace/demo_job
FATAL: Unable to find build script at /root/slave/workspace/demo_job/autobvt.xml
Build step 'Invoke Ant' marked build as failure
Recording test results
Finished: FAILURE
This autobvt.xml file already exists in the master. 该autobvt.xml文件已存在于主服务器中。 So looks like I need to copy this file over to the slave node manually which does not looks like quite handy.
因此,看起来我需要手动将此文件复制到从属节点,这似乎不太方便。
How I can instruct jenkins to copy this as part of the build? 我如何指示詹金斯将此副本作为构建的一部分?
使用“将数据复制到工作区” http://wiki.jenkins-ci.org/display/JENKINS/Copy+Data+To+Workspace+Plugin ,您可以使用这些文件将文件从主复制到从属并作为一部分运行构建过程(无需人工!)
我使用“ 复制到从属”插件对问题进行了排序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.