Build Publisher¶
The Build Publisher lets you copy any arbitrary files on a successful build.
You can set alwaysPublish to true, if you want the copy always to happen.
Version¶
Available from version 1.0
Examples¶
Minimalist example
1<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>)
Full example
1<buildpublisher>
2 <sourceDir>C:\myprojects\project1</sourceDir>
3 <publishDir>\\myfileserver\project1</publishDir>
4 <useLabelSubDirectory>false</useLabelSubDirectory>
5 <alwaysPublish>false</alwaysPublish>
6</buildpublisher>
This will copy the contents of C:\myprojects\project1 to the network share \\myfileserver\project1.
Configuration Elements¶
Element | Description | Type | Required | Default | Version |
alwaysPublish | Always copies the files, regardless of the state of the build. | Boolean | No | false | 1.0 |
cleanPublishDirPriorToCopy | Cleans the publishDir if it exists, so that you will always have an exact copy of the sourceDir. | Boolean | No | false | 1.5 |
cleanUpMethod | Defines a way to clean up published builds. | String - one of: * NoCleaning * KeepLastXBuilds * DeleteBuildsOlderThanXDays |
No | NoClean | 1.4.4 |
cleanUpValue | The value used for the cleaning method. | Int32 | No | 5 | 1.4.4 |
description | Description used for the visualisation of the buildstage, if left empty the process name will be shown. | String | No | The task/publisher name. | 1.5 |
dynamicValues | The dynamic values to use for the task. | Dynamic Values array | No | None | 1.5 |
environment | A set of environment variables set for commands that are executed. Each variable should be specified as
. |
Environment Variable array | No | ||
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 | No | n/a | 1.0 |
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 | No | n/a | 1.0 |
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. | Boolean | No | true | 1.0 |
Automatically Generated¶
Documentation generated on Monday, 26 May 2014 at 7:18:00 AM