jenkins:syncworkspace

Full name:

org.kuali.maven.plugins:jenkins-maven-plugin:1.2.7-SNAPSHOT:syncworkspace

Description:

Synchronize a Jenkins workspace to another location using rsync. To use this mojo, the rsync utility must be installed and in your path. If the mojo completes successfully the destination directory will contain the exact same set of files as the source directory. For the purposes of this mojo, "exactly the same" means, all the files on both sides have the same name, the same size, and the same last modified date.

Attributes:

  • Requires a Maven project to be executed.
  • Executes as an aggregator plugin.

Required Parameters

Name Type Since Description
destination String - The destination directory rsync pushes files to
User property is: jenkins.destination.
executable String - The rsync executable
Default value is: rsync.
User property is: jenkins.executable.
source String - The source directory rsync pulls files from. For rsync, the trailing slash is significant. A trailing slash on the source directory instructs rsync to place files directly into the destination directory instead of creating a sub-directory under the destination directory.
Default value is: ${project.basedir}/.
User property is: jenkins.source.

Optional Parameters

Name Type Since Description
basedir File - The base directory to scan for Maven build directories
Default value is: ${project.basedir}.
User property is: jenkins.basedir.
compress boolean - If true, rsync will compress files before transferring them. Equivalent to the -z command line switch.
Default value is: true.
User property is: jenkins.compress.
excludeTarget boolean - If true, the excludeTargetPattern will be used to exclude Maven build directories from the workspace sync
Default value is: true.
User property is: jenkins.excludeTarget.
excludeTargetPattern String - The pattern to use when matching Maven build directories. Any directories with this name get excluded by rsync eg /foo/target will be excluded but /footarget will not
Default value is: target.
User property is: jenkins.excludeTargetPattern.
excludesFile File - The file where the list of directories to exclude is aggregated. The full path to this file is passed to rsync with --exclude-from
Default value is: ${project.build.directory}/jenkins/rsync-excludes.
User property is: jenkins.excludesFile.
failOnError boolean - If true, the Maven build will fail if rsync returns a non-zero exit value
Default value is: true.
User property is: jenkins.failOnError.
ignoreCodes String - Comma separated list of integers that the plugin will silently ignore if they are returned as the exit value for rsync
User property is: jenkins.ignoreCodes.
stats boolean - If true, rsync will display statistics about the sync process. Equivalent to the --stats command line switch.
Default value is: true.
User property is: jenkins.stats.
verbose boolean - If true, rsync emits verbose logging. Equivalent to the -vv command line switch
Default value is: false.
User property is: jenkins.verbose.

Parameter Details

basedir:

The base directory to scan for Maven build directories
  • Type: java.io.File
  • Required: No
  • User Property: jenkins.basedir
  • Default: ${project.basedir}

compress:

If true, rsync will compress files before transferring them. Equivalent to the -z command line switch.
  • Type: boolean
  • Required: No
  • User Property: jenkins.compress
  • Default: true

destination:

The destination directory rsync pushes files to
  • Type: java.lang.String
  • Required: Yes
  • User Property: jenkins.destination

excludeTarget:

If true, the excludeTargetPattern will be used to exclude Maven build directories from the workspace sync
  • Type: boolean
  • Required: No
  • User Property: jenkins.excludeTarget
  • Default: true

excludeTargetPattern:

The pattern to use when matching Maven build directories. Any directories with this name get excluded by rsync eg /foo/target will be excluded but /footarget will not
  • Type: java.lang.String
  • Required: No
  • User Property: jenkins.excludeTargetPattern
  • Default: target

excludesFile:

The file where the list of directories to exclude is aggregated. The full path to this file is passed to rsync with --exclude-from
  • Type: java.io.File
  • Required: No
  • User Property: jenkins.excludesFile
  • Default: ${project.build.directory}/jenkins/rsync-excludes

executable:

The rsync executable
  • Type: java.lang.String
  • Required: Yes
  • User Property: jenkins.executable
  • Default: rsync

failOnError:

If true, the Maven build will fail if rsync returns a non-zero exit value
  • Type: boolean
  • Required: No
  • User Property: jenkins.failOnError
  • Default: true

ignoreCodes:

Comma separated list of integers that the plugin will silently ignore if they are returned as the exit value for rsync
  • Type: java.lang.String
  • Required: No
  • User Property: jenkins.ignoreCodes

source:

The source directory rsync pulls files from. For rsync, the trailing slash is significant. A trailing slash on the source directory instructs rsync to place files directly into the destination directory instead of creating a sub-directory under the destination directory.
  • Type: java.lang.String
  • Required: Yes
  • User Property: jenkins.source
  • Default: ${project.basedir}/

stats:

If true, rsync will display statistics about the sync process. Equivalent to the --stats command line switch.
  • Type: boolean
  • Required: No
  • User Property: jenkins.stats
  • Default: true

verbose:

If true, rsync emits verbose logging. Equivalent to the -vv command line switch
  • Type: boolean
  • Required: No
  • User Property: jenkins.verbose
  • Default: false