This plugin allows to copy a set of files, from a location somewhere on the master node, to jobs' workspaces. It also allows to copy files back from the workspaces of jobs located on a slave node to their workspaces on the master one.
 | New homepage The plug-in is being maintained by its owner/maintainers from a new home. The plug-in is still compatible with Hudson, however, the entry points for documentation and issue reporting have been combined in order to provide a single point of entry.
|
Plugin Information
Comments (28)
Mar 09, 2010
Mark Miller says:
I need a little help (more information) to get this plug-in working. I hav...I need a little help (more information) to get this plug-in working. I have two machines, an AIX Hudson master and a Windows machine running XP as the Hudson slave. The slave agent is installed as a service. It works great. I actually have the slave machine building my Java docs. So the setup works, but I am unable to copy any files from the master machine to slave using this plug-in. Here's what I do:
Step 4 is when I start running into trouble. When I specify "/test/build.xml" the edit box complains it can't find the file. I've verified the file exists. I even copy-pasted the path from the console window to make sure it's not a typo. Hudson edit box says it can't find the file. Ok, fine, I ignore it and run the job anyway. The job reports success... but there is no file copied over, and I don't see anything in the job console output showing a file being copied over, but the plug-in also doesn't complain that it's not finding any files. I'm using plug-in 1.2. I'm using Hudson 1.348.
The help text for each option is confusing. The help says:
"When a build takes place on a slave node, copies a set of files from the master node to this slave node. This is useful, for example, when some files required for the build to take place are not present in the SCM and are located direclty in the project's workspace.
Of course, no copy will take place if the build is run on the master node."
"Comma- or space-separated list of patterns of files/directories to be copied from the master node to the slave one. See the @includes of Ant fileset for the exact format. The base directory is the workspace.
E.g.: *.xml,*/.properties"
The part that's confusing me is that when a job is tied to a slave node the "workspace" is now on the slave machine, not local to the master, so any file paths using the workspace as the base wouldn't work since the files I need to copy aren't on the slave, obviously. I'm thinking this is just bad text, or maybe I'm missing something obvious about the wording.
So here is what I do know.
If you could provide any insight as to what I'm doing wrong I'd really appreciate it. I've systematically tried just about everything I can think of and have been completely unsuccessful at getting the plug-in to work for me.
I appreciate the help.
Mark
Mar 09, 2010
Vincent Latombe says:
I agree with the previous comment, I have no clue about where the files to copy ...I agree with the previous comment, I have no clue about where the files to copy to the slave are taken from.
Mar 10, 2010
Romain Seguy says:
When you activate this plugin for job A, then the Files to copy field is expecte...When you activate this plugin for job A, then the Files to copy field is expected to contain a set of folders/files that are relative to the workspace of the job (there is a link in to this workspace in the inline help), that is, that are relative to the folder <HUDSON_HOME>/jobs/A/workspace (as of Hudson 1.312). E.g., if the files to copy are named *.xml and are located in <HUDSON_HOME>/commonFiles, then the field must be set to ../../../commonFiles/*.xml.
Mar 10, 2010
Vincent Latombe says:
Hello, thanks for the precisions, I have been able to copy a file that sits in t...Hello,
thanks for the precisions, I have been able to copy a file that sits in the workspace. However, couldn't manage to copy an xml file that is inside HUDSON_HOME. In my case, I've tried using ../../../clean.xml (the file sits in HUDSON_HOME) and it doesn't seem to be copied to the slave.
Furthermore, even when it works, it could be useful to get a log of what was copied (at least the number of files). Currently, I get nothing in the output.
Mar 10, 2010
Romain Seguy says:
Try to manually create the workspace folder on the master, it should help I thin...Try to manually create the workspace folder on the master, it should help I think. For the next release I will add the creation of the workspace to avoid this pbm.
The plugin has some logging capabilities, you need to set the log level to FINEST.
Mar 10, 2010
Vincent Latombe says:
Ok, I now have the logs, but I still cannot reference any file that is in parent...Ok, I now have the logs, but I still cannot reference any file that is in parent directories. Thanks for the help anyway.
Mar 10, 2010
Romain Seguy says:
That's weird... May you send me the details of you config (Hudson version and jo...That's weird... May you send me the details of you config (Hudson version and job's config.xml) on my mail so that I can investigate on that?
Apr 21, 2010
Carl Quinn says:
I am using Hudson 1.353 and the latest version 1.2 of this plugin and I also see...I am using Hudson 1.353 and the latest version 1.2 of this plugin and I also see a failure in its ability to get to files above the jobs workspace. Even with the workspace manually created.
Is it possible that Hudson core is preventing it from accessing files above the workspace? Or maybe this plugin is somehow being executed on the slave and not the master?
I am trying to use this plugin to push a build artifact from one job built on a local slave, to another job that builds on an EC2 instance which doesn't have access to our network. This plugin seemed like just the right tool to do the push...
Nov 11, 2010
Romain Seguy says:
The 1.2.2 release adds a new option which allows specifying the files relatively...The 1.2.2 release adds a new option which allows specifying the files relatively to HUDSON_HOME rather than the workspace. HTH.
Mar 16, 2010
Gabriel Baez says:
It would be awesome if this plugin cloned the work space ...It would be awesome if this plugin cloned the work space from the master to a slave for building.
For example in my environment we cant install clearcase on linux machines and there are some applications that need to be build from a linux environment. My hudson install it's on a windows server, if I could checkout the code from the windows hudson and then send that to the slave that would be great!
Mar 16, 2010
Romain Seguy says:
You should take a look at the Clone Workspace SCM Plugin for that.You should take a look at the Clone Workspace SCM Plugin for that.
May 12, 2010
Glen Accardo says:
I'm having exactly the same issue as Vincent Latombe. I can specify *&...I'm having exactly the same issue as Vincent Latombe. I can specify ** as the files to copy to the slave, and get every
file in the workspace. However, if I specify "../**" or any relative path, I get nothing. I'm running Hudson 1.355 on a
Windows 2003 system.
Any assistance resolving this issue would be appreciated.
May 20, 2010
Romain Seguy says:
Kindly open an issue in JIRA for that an assign it to the proper component (you ...Kindly open an issue in JIRA for that an assign it to the proper component (you may need to request through the dev mailing list for the copy-to-slave component to be created, I don't think it's been created yet).
Jul 19, 2010
Fred G says:
I opened a bug for this: http://issues.hudson-ci.org/browse/HUDSON-7021 Please ...I opened a bug for this: http://issues.hudson-ci.org/browse/HUDSON-7021
Please vote for it.
Nov 11, 2010
Romain Seguy says:
Fixed in 1.2.2: It adds a new option which allows specifying the files relative...Fixed in 1.2.2: It adds a new option which allows specifying the files relatively to HUDSON_HOME rather than the workspace.
Nov 29, 2010
kdszh says:
Hi all: what's the execution order between copy-to-slave and gr...Hi all:
what's the execution order between copy-to-slave and groovyo-postbuild plugin ?
I want to run copy-to-slave first,then groovy-postbuild ,but since I install groovy-postbuild plugin ,then install copy-to-slave plugin ,Hudson always run groovy-postbuild first.
somebody help me ? :(
Hudson version: 1.383
copy-to-slave: 1.2
groovy-postbuild: 1.3
Nov 30, 2010
Romain Seguy says:
Hi, What is your exact requirement? I guess that your need it to process the fi...Hi,
What is your exact requirement? I guess that your need it to process the file(s) that the build has produced using some Groovy stuff. If yes, couldn't you do it on the slave side before using the "Copy back to master" option?
I ask that because the order of the execution of the plugins can't be guaranteed unless some special care is taken at the source code level. But, I won't implement that in the copy-to-slave plugin since the requirements will never be the same depending on users.
Dec 02, 2010
Hendryk Bockelmann says:
Hey you, I want to use this pretty cool plugin to copy some generally needed scr...Hey you, I want to use this pretty cool plugin to copy some generally needed scripts from master to several slaves.
The files are located in $HUDSON_HOME/userContent/* and the upload to slaves work quite good (at least on my Linux slaves ... there are some problems on AIX slaves btw).
What I now see is that on the slaves the files get copies to $WORKSPACE and the relative path from the master is preserved, ie. on the slave a new directory userContent is created. I think it would be a fine option for the plugin to be able to set the path on the slave (relative to $WORKSPACE) within the job configuration.
Dec 02, 2010
Romain Seguy says:
Hi Hendrik, I understand your need, but it raises a question (which is why I di...Hi Hendrik,
I understand your need, but it raises a question (which is why I didn't implement such a functionality yet): How the handling of several different paths to copy (e.g. userContent/*/, myScripts/*/) would be done? In case you copy just one folder, then ok, it can be easily implemented in the plugin by adding some kind of a mv command. But in case of several folders, that's far more complicated than that.
What about having a "flatten" option which would just, well, flatten everything in the workspace directory?
Dec 02, 2010
Hendryk Bockelmann says:
Hey Romain, thanx for quick response. imho it would be a nice option if I could ...Hey Romain, thanx for quick response. imho it would be a nice option if I could set a "flatten" flag that ensures all files from different directories on master to be copied directly into $WORKSPACE of the slave.
Maybe there could be a dropdown-menu which says: 'keep directory structure of master' or 'copy all files to $WORKPACE'
Dec 02, 2010
Romain Seguy says:
Ok, let's go for the "flatten" option. Please open an issue in the JIRA issue tr...Ok, let's go for the "flatten" option. Please open an issue in the JIRA issue tracker, it'll be automatically assigned to myself and I'll be sure to not lose track of it (as I won't do it today).
Dec 23, 2010
Patrick Renaud says:
This plugin is interesting. However, in the case of a maven2 project I noticed i...This plugin is interesting. However, in the case of a maven2 project I noticed it runs after the pre-build steps, which is too late for what I would need it to. Is there a way to bump its execution order to occur before the pre-build steps?
Jan 02, 2011
Romain Seguy says:
I'm afraid the answer is no...I'm afraid the answer is no...
Jan 04, 2011
Patrick Renaud says:
Hi Romain, But you do realize that it makes this plugin rather useless for mave...Hi Romain,
But you do realize that it makes this plugin rather useless for maven2 jobs, do you? Or should it say: it makes it useless for maven2 jobs who need the files copied by the plugin during the pre-build steps.
If it is really impossible to run the plugin before the maven pre-build steps as you indicated, would you be able to suggest an alternate path to do what I need to do? In essence, the pre-build step need to run on files copied by the copy-to-slave plugin (thus files purposely not in SCM). Otherwise, it seems that my only choice is to abandon using this plugin, and that would not be my first choice. This is a nice plugin that fits well in a build process, but executing at the wrong time.
Jan 05, 2011
Romain Seguy says:
Hi Patrick, One first thing, can you confirm I'm right if I say that what bring...Hi Patrick,
One first thing, can you confirm I'm right if I say that what brings pre- and post-build steps to your Maven jobs is the M2 Extra Steps Plugin? I'll assume the answer is yes.
This plugin adds pre-build steps by using the notion of build wrapper. The Copy To Slave plugin does exactly the same. The bad point with build wrappers is that there's currently no way to control the order in which they are executed (although this could actually be done by altering the behavior of Hudson core). That's why my answer is no, and that's also why versions 1.0 and 1.1 of the plugin were purposely not usable for Maven jobs.
Jan 06, 2011
Patrick Renaud says:
Salut Romain, OK, now I understand! Tx very much for the explanation. Is it...Salut Romain,
OK, now I understand! Tx very much for the explanation. Is it in your plans to upgrade the plugin eventually so we could use it for maven jobs that way? No rush, just asking...
Tx again!
Jan 07, 2011
Romain Seguy says:
I'm not a Maven user + Hudson is currently under heavy changes with the move to ...I'm not a Maven user + Hudson is currently under heavy changes with the move to Maven 3, so I don't feel I can do this by myself.
Feb 26, 2011
Raghuram Arakalgud says:
Hi, Thanks for this wonderful plugin. Is there an ETA for Version 1.2.4 release?...Hi,
Thanks for this wonderful plugin.
Is there an ETA for Version 1.2.4 release?
Thanks,