jenkins:syncworkspace

Full name:

org.kuali.maven.plugins:jenkins-maven-plugin:1.1.13-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
executable String - The rsync executable
Default value is: rsync.
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}/.

Optional Parameters

Name Type Since Description
basedir File - The base directory to scan for Maven build directories
Default value is: ${project.basedir}.
compress boolean - If true, rsync will compress files before transferring them. Equivalent to the -z command line switch.
Default value is: true.
excludeTarget boolean - If true, the excludeTargetPattern will be used to exclude Maven build directories from the workspace sync
Default value is: true.
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.
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.
failOnError boolean - If true, the Maven build will fail if rsync returns a non-zero exit value
Default value is: true.
ignoreCodes String - Comma separated list of integers that the plugin will silently ignore if they are returned as the exit value for rsync
stats boolean - If true, rsync will display statistics about the sync process. Equivalent to the --stats command line switch.
Default value is: true.
verbose boolean - If true, rsync emits verbose logging. Equivalent to the -vv command line switch
Default value is: false.

Parameter Details

basedir:

The base directory to scan for Maven build directories
  • Type: java.io.File
  • Required: No
  • Expression: ${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
  • Expression: ${jenkins.compress}
  • Default: true

destination:

The destination directory rsync pushes files to
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${jenkins.destination}

excludeTarget:

If true, the excludeTargetPattern will be used to exclude Maven build directories from the workspace sync
  • Type: boolean
  • Required: No
  • Expression: ${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
  • Expression: ${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
  • Expression: ${jenkins.excludesFile}
  • Default: ${project.build.directory}/jenkins/rsync-excludes

executable:

The rsync executable
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${jenkins.executable}
  • Default: rsync

failOnError:

If true, the Maven build will fail if rsync returns a non-zero exit value
  • Type: boolean
  • Required: No
  • Expression: ${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
  • Expression: ${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
  • Expression: ${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
  • Expression: ${jenkins.stats}
  • Default: true

verbose:

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