简体   繁体   中英

How to copy data from Master to multiple Slave in Jenkins

我正在尝试从jenkins主服务器的git存储库中提取数据(文件),然后将这些文件推送到多个从服务器。我正在使用将复制工件复制到Slave插件( https://wiki.jenkins-ci.org/display/JENKINS/ Copy + To + Slave + Plugin )将数据从主机复制到从机。但是我无法找出如何指定要复制文件的从机的名称。请帮助

I think this plugin copy some set of files from the master on the slave where the job is executed.

So once your job is running, the plugin will copy the files only on one slave...

(On the job, you can specify the slave in the "Restrict where this project can be run" section)

If your objective is to copy a set of files from the master to N nodes, maybe it's better to create a dedicated job on the master, and launch a batch/shell script to copy the files on your N slaves using network shared drives.

Another solution should be to have a dedicated job, using your plugin + the Matrix configuration plugin to launch your job on several slaves.

I think the 2nd solution is better.

If the task is to simply copy files from a git repo to the slave(s) where the job(s) are running, then that is exactly what the git plugin is supposed to do. https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin

It will pull the git repo files to the slave where the job is running. Use multiple jobs or the Matrix configuration plugin if you want it to run on multiple slaves.

您无需指定从属的名称。配置作业后,此插件将在计划运行作业的节点上复制文件。

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