简体   繁体   English

如何将构建XML从Master复制到Jenkins中的Slave节点?

[英]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.

相关问题 Jenkins:从主服务器上的build文件夹复制到从服务器上的工作区 - Jenkins: Copy from build folder on master to workspace on slave 如何将作业的工作区从 jenkins 主容器复制到从容器并从从容器复制回主容器? - How to copy a workspace of a job from jenkins master to slave container and copy back from slave to master? 如何在Jenkins中将数据从Master复制到多个Slave - How to copy data from Master to multiple Slave in Jenkins 在 Pipeline 中将文件从 Jenkins master 复制到 slave - Copy file from Jenkins master to slave in Pipeline 如何构建可以通过 Jenkins master 运行节点基础项目的基于节点的 dockerized jenkins-slave - how to build node based dockerized jenkins-slave that can run the node base project through Jenkins master Jenkins将slave版本从master上传到服务器 - Jenkins upload slave build to a server from master Jenkins-如何在从属机器上建立主作业? - Jenkins - How to build a master job in slave machine? 如何确保构建从Node参数中选择空闲的Jenkins从站? - How to ensure that a build selects an idle Jenkins slave from the Node parameter? 在从节点而不是主节点上运行 jenkins post build 步骤 - Run jenkins post build step on the slave node instead of Master Jenkins 主从节点配置 - Jenkins master and slave node configuration
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM