Reputation: 1080
I am trying to pull data(files) from git repository in the jenkins master and then push those files to multiple slaves.I am using Copy artifact to Slave plugin(https://wiki.jenkins-ci.org/display/JENKINS/Copy+To+Slave+Plugin) to copy the data from master to slave.But I am Unable to find out how to specify the name of the slave machines where the files have to be copied .Please help
Upvotes: 1
Views: 5682
Reputation: 768
you do not need to specify the name of the slave, Once you configure the job, this plugin will copy the files on the node where your job is schedule to run.
Upvotes: 0
Reputation: 1181
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.
Upvotes: 1
Reputation: 10382
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.
Upvotes: 1