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.
About this plugin
This plugin allows:
- To copy, from a location somewhere on the master node, to the workspace of a job being built, a set of files that are required for the good execution of the job. This is useful, for example, when not all the build scripts (Ant build files, etc.) are in the SCM.
- To copy, from the slave node running the job, back to the master node, a set of files that are required for some post-processing (e.g. test results).
Copy files into the job's workspace before building
To activate this plugin for a given job, simply check the Copy files into the job's workspace before building checkbox in the Build Environment section of the job. You then get the following fields:
- Files to copy is where you define the files that have to be copied to the workspace of the job before the build actually takes place. If the files to copy have previously been copied (in a previous build), they are overwritten.
- Paths are relative to is used to define where the files specified in Files to copy come from. There are three choices (cf. screenshot below). Using
HUDSON_HOME/userContent is highly recommended.
The Advanced section offers the following additional fields:
- Files to exclude from the copy allows to define which files, that have been taken into account by the Files to copy field, must not be copied.
- Flatten directories is used to flatten the directory structure, if applicable.
- Include Ant's default excludes is used to specify that Ant's default excludes (e.g.
.svn folders, etc.) must also be copied.
Kindly refer to the inline help for more information.
Copy files back to master node
To activate this plugin for a given job, simply check the Copy files back to the job's workspace on the master node checkbox in the Post-build Actions section of the job. You then get the same two fields as for the Copy files to slave node before building section (note that label in the screenshot is old):
Version 1.4.4 (02/23/2015)
- Fixed ISSUE#25346 which addresses the workspace issue where files copied back to master are not in correct path
Version 1.4.3 (09/28/2013)
- Fixed ISSUE#18899 by adding an option to select whether to run copying files back to master after result is finalised or along with other post build tasks. (See the updated screen shot above)
- Plugin upgraded to Jenkins 1.424
- Sorry about versions 1.4.1 and 1.4.2, they failed while performing release as I am new to jenkins,maven and git.
Version 1.4 (01/17/2012)
- Implemented JENKINS-10691: Added a new Override destination folder field to override destination folder on master node
- As part of JENKINS-12281, added a new section in the main Jenkins configuration screen to specify an additional Paths are relative to option
- Fixed JENKINS-12281: It is now possible to remove
HUDSON_HOME from the list of base locations for copy to slave operations (from the new section in the main Jenkins configuration screen)
- Fixed a typo in the help message of the Files to copy field
- Plugin upgraded to Jenkins 1.409
Version 1.3 (03/02/2011)
- New Paths are relative to option offering more possibilities to specify the root location of files to copy (three possibilities:
HUDSON_HOME or the jobs' workspace)
- Refactored UI to emphasize the new Paths are relative to field
- Changed labels for easier understanding
Version 1.2.3 (12/13/2010)
- New Flatten directories option (see JENKINS-8220)
- Fixed JENKINS-8274: An InvalidClassException was thrown when using copy-to-slave from Linux to Windows
- Fixed JENKINS-8155: It's now possible to copy to an AIX, HP-UX or Linux S/390 node
Version 1.2.2 (11/11/2010)
- Fixed JENKINS-7021: It is now possible to copy files relatively to
HUDSON_HOME rather than the workspace of jobs
- Fixed JENKINS-7999: Ant's default excludes are now taken into account
- Plugin upgraded to Hudson 1.375
Version 1.2.1 (09/01/2010)
Version 1.2 (03/08/2010)
- The use of the plugin is no more restricted to free-style projects
Version 1.1 (02/01/2010)
- New Copy back to master notifier which allows copying data back to the master once the build ends
Version 1.0 (10/27/2009)