简体   繁体   中英

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.

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.

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. 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 ,您可以使用这些文件将文件从主复制到从属并作为一部分运行构建过程(无需人工!)

我使用“ 复制到从属”插件对问题进行了排序。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM