Dashboard > CruiseControl.NET > ... > Task Blocks > Build Publisher
Build Publisher Log In View a printable version of the current page.  
CruiseControl.NET documentation for latest CI builds
Added by Mike Roberts , last edited by Richard J Foster on Aug 23, 2007  (view change) show comment

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

<buildpublisher />

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>

As far as I can tell, it is ignoring the false value I inserted as a value for 'useLabelSubdirectory'. It keeps creating sub-folders in the target directory with the files, and placing the files therein. To avoid typographical errors, I cut-and-pasted the sample form above.

'useLabelSubdirectory' is meant for creating a directory under the target directory with the build label. It doesn't control whether any sub-folders are created in the target directory. That depends on whether your source directory has any sub-folders. It might be a good idea to be able to specify the number of sub-levels of the source directory it should copy.

Powered by a free Atlassian Confluence Open Source Project / Non-profit License granted to ThoughtWorks, Inc.. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators