The Build Publisher lets you copy any arbitrary files on a successful build.
Example
<buildpublisher>
<sourceDir>C:\myprojects\project1</sourceDir>
<publishDir>\\myfileserver\project1</publishDir>
<useLabelSubDirectory>false</useLabelSubDirectory>
</buildpublisher>
This will copy the contents of C:\myprojects\project1 to the network share \\myfileserver\project1.
Minimal Configuration Example
This will copy the contents of the project's working directory to a new label subdirectory under the project's artifact directory (i.e. <artifact_dir>\<label_dir>)
Configuration Elements:
| Node |
Description |
Type |
Required |
Default |
| sourceDir |
The source directory to copy files from. This path can be absolute or can be relative to the project's working directory. If unspecified, the project's working directory will be used as the source directory. |
string |
false |
n/a |
| publishDir |
The directory to copy the files to. This path can be absolute or can be relative to the project's artifact directory. If useLabelSubDirectory is true (default) a subdirectory with the current build's label will be created, and the contents of sourceDir will be copied to it. If unspecified, the project's artifact directory will be used as the publish directory. |
string |
false |
n/a |
| useLabelSubDirectory |
If set to true (the default value), files will be copied to subdirectory under the publishDir which will be named with the label for the current integration. |
bool |
false |
true |
This block used to support an 'additionalDir' attribute. This feature has been removed - just use multiple <buildpublisher> blocks to achieve the same job.
The useLabelSubDirectory property has been added in 1.2.
Might be nice if a fileset could be included...
<source>C:\myprojects\project1*-results.xml</source>