Back to Top

Get Jenkins Job Status

Class Name com.midvision.rapiddeploy.plugins.build.jenkins.task.GetJobStatus
Category Jenkins

Get Jenkins Job Status

Description

Get the status of the last build of a Jenkins Job. Write the status to the corresponding output parameters for use in later tasks.

Parameters

The following parameters may be set on this task:

Table of task Parameters

Name Type Default Value Optional Description
failOnError java.lang.Boolean true false This task will not fail the deployment on error if set to false.
jenkinsJobName java.lang.String Job false The Jenkins job to check.
jenkinsUrl java.lang.String http://localhost/jenkins false The remote Jenkins URL.
jobStatus java.lang.String ${jobStatus} false The name of the output parameter, which can pass the return value from the task. The task output will be the Jenkins job status: "Building" or "Waiting for Next time to Build". Define a unique parameter name starting with '${', ending with '}' for the whole orchestration (latter tasks can override the parameter value if the same parameter name is specified). You can refer to this parameter in any task below in the task list, as an input parameter ${jobStatus}.
lastBuildRawData java.lang.String ${lastBuildRawData} false The name of the output parameter, which can pass the return value from the task. The task output will be the raw data of the last build. Define a unique parameter name starting with '${', ending with '}' for the whole orchestration (latter tasks can override the parameter value if the same parameter name is specified). You can refer to this parameter in any task below in the task list, as an input parameter ${lastBuildRawData}.
lastBuildStartTime java.lang.String ${lastBuildStartTime} false The name of the output parameter, which can pass the return value from the task. The task output will be the Jenkins job last build start time. Define a unique parameter name starting with '${', ending with '}' for the whole orchestration (latter tasks can override the parameter value if the same parameter name is specified). You can refer to this parameter in any task below in the task list, as an input parameter ${lastBuildStartTime}.
lastBuildStatus java.lang.String ${lastBuildStatus} false The name of the output parameter, which can pass the return value from the task. The task output will be the Jenkins job last build status. Define a unique parameter name starting with '${', ending with '}' for the whole orchestration (latter tasks can override the parameter value if the same parameter name is specified). You can refer to this parameter in any task below in the task list, as an input parameter ${lastBuildStatus}.
password java.lang.String   true Password to use to authenticate when connecting to Jenkins (if required).
skipOnFailure java.lang.String Previous Task Name true Skip current task based on the name of the previous task whether has failed or not.
username java.lang.String   true Username to use to authenticate when connecting to Jenkins (if required).


Back to Top

Get Job Config

Class Name com.midvision.rapiddeploy.plugins.build.jenkins.task.GetJobConfig
Category Jenkins

Get Jenkins Job Configuration

Description

Return the Job Configuration for the given job, as XML (config.xml).

Parameters

The following parameters may be set on this task:

Table of task Parameters

Name Type Default Value Optional Description
failOnError java.lang.Boolean true false This task will not fail the deployment on error if set to false.
jenkinsJobName java.lang.String Job false The Jenkins job to invoke.
jenkinsUrl java.lang.String http://localhost/jenkins false The remote Jenkins URL.
jobConfig java.lang.String ${jobConfig} false The name of the output parameter, which can pass the return value from the task. The task output will be the Jenkins job configuration in XML format (config.xml). Define a unique parameter name starting with '${', ending with '}' for the whole orchestration (latter tasks can override the parameter value if the same parameter name is specified). You can refer to this parameter in any task below in the task list, as an input parameter ${jobConfig}.
password java.lang.String   true Password to use to authenticate when connecting to Jenkins (if required).
skipOnFailure java.lang.String Previous Task Name true Skip current task based on the name of the previous task whether has failed or not.
username java.lang.String   true Username to use to authenticate when connecting to Jenkins (if required).


Back to Top

Invoke a Jenkins Job

Class Name com.midvision.rapiddeploy.plugins.build.jenkins.task.InvokeJob
Category Jenkins

Invoke a Jenkins Job

Description

Run a Jenkins Job from RapidDeploy. Optionally, wait for the job to complete.

Any extra task parameters included in this task apart from the ones defined in the below table will be considered parameters of the Jenkins Job.

Trying to invoke a Jenkins Job that does not have parameters in its configuration, with parameters in the task, or vice versa, will result in failure.

The supported Jenkins Job parameter types are:
  • String Parameter
  • Boolean Parameter
  • Choice Parameter
  • Password Parameter
  • File Parameter
All parameter types except for the "File Parameter" one are set as strings in the task, the type of the parameter depends on what is configured in the Jenkins Job.

By default all the parameters are normally set as string parameters, but if a task parameter key contains the prefix "file_" it will then be considered a parameter of type file in the Jenkins Job, e.g.:
  • file_envDistribution.yaml
  • file_properties/mainProps.properties
  • file_configuration/local/buildConfig.xml
Keep in mind the parameter key part after the "file_" prefix must match the file path set in the Jenkins Job File Parameter as relative to the Jenkins job workspace, and the value of the parameter is a file in the target server that can be relative to the project folder using the ${ARCHIVE_ROOT} built in orchestration variable.

Parameters

The following parameters may be set on this task:

Table of task Parameters

Name Type Default Value Optional Description
failOnError java.lang.Boolean true false This task will not fail the deployment on error if set to false.
jenkinsJobName java.lang.String Job false The Jenkins job to invoke.
jenkinsUrl java.lang.String http://localhost/jenkins false The remote Jenkins URL.
password java.lang.String   true Password to use to authenticate when connecting to Jenkins (if required).
skipOnFailure java.lang.String Previous Task Name true Skip current task based on the name of the previous task whether has failed or not.
username java.lang.String   true Username to use to authenticate when connecting to Jenkins (if required).
waitForBuild java.lang.Boolean false false This task will wait for the build to complete if set to true. If set to false (the default), the build will be executed asynchronously.


Back to Top

Set Job Config

Class Name com.midvision.rapiddeploy.plugins.build.jenkins.task.SetJobConfig
Category Jenkins

Set Jenkins Job Configuration

Description

Set the Job Configuration for the given job, as XML (config.xml).

Parameters

The following parameters may be set on this task:

Table of task Parameters

Name Type Default Value Optional Description
failOnError java.lang.Boolean true false This task will not fail the deployment on error if set to false.
jenkinsJobName java.lang.String Job false The Jenkins job to invoke.
jenkinsUrl java.lang.String http://localhost/jenkins false The remote Jenkins URL.
jobConfig TextArea   false THe Job Configuration to set. Enter the XML here to set for the job configuration.
password java.lang.String   true Password to use to authenticate when connecting to Jenkins (if required).
skipOnFailure java.lang.String Previous Task Name true Skip current task based on the name of the previous task whether has failed or not.
username java.lang.String   true Username to use to authenticate when connecting to Jenkins (if required).