jenkins:runjob

Full name:

org.kuali.maven.plugins:jenkins-maven-plugin:1.1.15:runjob

Description:

Connect to a Jenkins server and kick off a job

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • The goal is thread-safe and supports parallel builds.

Required Parameters

Name Type Since Description
cmd String - The Jenkins CLI command for running a job
Default value is: build.
failOnError boolean - If set to true, the Maven build will fail if Jenkins CLI returns a non-zero exit value, otherwise the Maven build will continue
Default value is: true.
jobTypes String - Comma separated list of known job types. When specifying a job name these can be used as shorthand for the fully qualified job name. eg "publish" gets expanded to "jenkins-maven-plugin-1.1-publish". To turn off expansion set 'jobTypes' to the empty string, null, or 'NONE'
Default value is: publish,unit,license,release.
skipIfNoChanges boolean - If true, check for changes before running the job. If nothing has changed, do not run the job.
Default value is: false.
stopOnError boolean - If set to true, the build will fail the first time Jenkins CLI encounters an issue. When false, mojo's that issue multiple CLI requests, will proceed through their list of requests and then fail at the end if an issue was encountered along the way.
Default value is: false.
successCodes String - Comma separated list of integers that represent a Jenkins CLI command completing successfully
Default value is: 0.
template String - The location of the jenkins job config template
Default value is: classpath:org/kuali/jenkins/jobs/template.xml.
timestampFormat String - The format for timestamp displays
Default value is: yyyy-MM-dd HH:mm:ss z.
url String - The Jenkins instance to connect to.
Default value is: ${project.ciManagement.url}.
wait boolean - If true, wait for the job to complete before continuing.
Default value is: false.
workingDir File - The working directory for the plugin
Default value is: ${project.build.directory}/jenkins.

Optional Parameters

Name Type Since Description
majorVersion String - This is the "major version" for the project. For a project with the version "1.1.0" the major version is "1.1". If not provided, this value is filled in automatically based on information from the POM.
name String - The name of the job.
Default value is: publish.
paramMap Map - key=value pairs to pass to the Jenkins job as build parameters
params String - Comma delimited list of key=value pairs to pass to the Jenkins job as build parameters
scmType String - This is the type of SCM for the project eg "svn" or "git". If not provided, this value is filled in automatically based on information in the POM.
scmUrl String - This is the SCM url for the project eg "http://svn.kuali.org/repos/foundation/trunk/jenkins-maven-plugin". If not provided, this value is filled in automatically based on information in the POM.

Parameter Details

cmd:

The Jenkins CLI command for running a job
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${jenkins.cmd}
  • Default: build

failOnError:

If set to true, the Maven build will fail if Jenkins CLI returns a non-zero exit value, otherwise the Maven build will continue
  • Type: boolean
  • Required: Yes
  • Expression: ${jenkins.failOnError}
  • Default: true

jobTypes:

Comma separated list of known job types. When specifying a job name these can be used as shorthand for the fully qualified job name. eg "publish" gets expanded to "jenkins-maven-plugin-1.1-publish". To turn off expansion set 'jobTypes' to the empty string, null, or 'NONE'
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${jenkins.jobTypes}
  • Default: publish,unit,license,release

majorVersion:

This is the "major version" for the project. For a project with the version "1.1.0" the major version is "1.1". If not provided, this value is filled in automatically based on information from the POM.
  • Type: java.lang.String
  • Required: No
  • Expression: ${jenkins.majorVersion}

name:

The name of the job.
  • Type: java.lang.String
  • Required: No
  • Expression: ${jenkins.name}
  • Default: publish

paramMap:

key=value pairs to pass to the Jenkins job as build parameters
  • Type: java.util.Map
  • Required: No

params:

Comma delimited list of key=value pairs to pass to the Jenkins job as build parameters
  • Type: java.lang.String
  • Required: No
  • Expression: ${jenkins.params}

scmType:

This is the type of SCM for the project eg "svn" or "git". If not provided, this value is filled in automatically based on information in the POM.
  • Type: java.lang.String
  • Required: No
  • Expression: ${jenkins.scmType}

scmUrl:

This is the SCM url for the project eg "http://svn.kuali.org/repos/foundation/trunk/jenkins-maven-plugin". If not provided, this value is filled in automatically based on information in the POM.
  • Type: java.lang.String
  • Required: No
  • Expression: ${jenkins.scmUrl}

skipIfNoChanges:

If true, check for changes before running the job. If nothing has changed, do not run the job.
  • Type: boolean
  • Required: Yes
  • Expression: ${jenkins.skipIfNoChanges}
  • Default: false

stopOnError:

If set to true, the build will fail the first time Jenkins CLI encounters an issue. When false, mojo's that issue multiple CLI requests, will proceed through their list of requests and then fail at the end if an issue was encountered along the way.
  • Type: boolean
  • Required: Yes
  • Expression: ${jenkins.stopOnError}
  • Default: false

successCodes:

Comma separated list of integers that represent a Jenkins CLI command completing successfully
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${jenkins.successCodes}
  • Default: 0

template:

The location of the jenkins job config template
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${jenkins.template}
  • Default: classpath:org/kuali/jenkins/jobs/template.xml

timestampFormat:

The format for timestamp displays
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${jenkins.timestampFormat}
  • Default: yyyy-MM-dd HH:mm:ss z

url:

The Jenkins instance to connect to.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${jenkins.url}
  • Default: ${project.ciManagement.url}

wait:

If true, wait for the job to complete before continuing.
  • Type: boolean
  • Required: Yes
  • Expression: ${jenkins.wait}
  • Default: false

workingDir:

The working directory for the plugin
  • Type: java.io.File
  • Required: Yes
  • Expression: ${jenkins.workingDir}
  • Default: ${project.build.directory}/jenkins