The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Table of Contents

OpenShift Pipeline Jenkins Plugin

openshiftBuild: Trigger OpenShift Build

  • bldCfg : String
    If you run `oc get bc` for the project listed in "nameSpace", that is the value you want to put here.
  • apiURL : String (optional)
  • authToken : String (optional)
  • buildName : String (optional)
    The value here is what you supply with the --from-build option when invoking the OpenShift `oc start-build` command. It allows you to point to OpenShift build to a previously run build, and run another build with exactly the same source and destination metadata. If you do not supply a value, the plugin will generate a new OpenShift build based on the Build Configuration referenced.
  • checkForTriggeredDeployments : String (optional)
    This flag is the toggle for turning on or off the verification that any deployments triggered by this build's output fired.
  • commitID : String (optional)
    The value here is what you supply with the --commit option when invoking the OpenShift `oc start-build` command. It allows you to point the OpenShift build to a specific commit hash from the git-log of the source repository. If you do not supply a value, the plugin assumes the latest version from the source repository should be used.
  • env (optional)
    Specify a list of environment variables to include in the build (see `oc start-build -e ...`).
      Array / List of Nested Object
    • name : String
      The name of the environment variable to set.
    • value : String
      The value for the environment variable.
  • namespace : String (optional)
  • showBuildLogs : String (optional)
    Indicates whether the build logs get dumped to the console of the Jenkins build.
  • verbose : String (optional)
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftCreateResource: Create OpenShift Resource(s)

  • jsonyaml : String
    The JSON or YAML formatted text that conforms to the schema for defining the various OpenShift resources.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)

openshiftDeleteResourceByJsonYaml: Delete OpenShift Resource(s) from JSON or YAML

  • jsonyaml : String
    The JSON or YAML formatted text that conforms to the schema for defining the various OpenShift resources.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)

openshiftDeleteResourceByKey: Delete OpenShift Resource(s) by Key

  • types : String
    The comma separated list of types of API objects to delete. See https://docs.openshift.org/latest/rest_api/index.html for the supported types.
  • keys : String
    The comma separated list of keys of the API objects to delete.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)

openshiftDeleteResourceByLabels: Delete OpenShift Resource(s) using Labels

  • types : String
    The comma separated list of types of API objects to delete, where those objects have labels corresponding to the specified key/value pairs. See https://docs.openshift.org/latest/rest_api/index.html for the supported types.
  • keys : String
    The comma separated list of keys of the labels in the API objects to delete.
  • values : String
    The comma separated list of values of the labels in the API objects to delete.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)

openshiftDeploy: Trigger OpenShift Deployment

  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftExec: OpenShift Exec

  • pod : String
    The pod in which to execute a command.
  • apiURL : String (optional)
  • arguments (optional)
    Specify a list of arguments to pass to the command.
      Array / List of Nested Object
    • value : String
      The value for the environment variable.
  • authToken : String (optional)
  • command : String (optional)
    The name of the command to execute.
  • container : String (optional)
    The container in which to execute a command. If not specified, the first container in the pod will be used.
  • namespace : String (optional)
  • verbose : String (optional)
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftImageStream: OpenShift ImageStreams

  • name : String (optional)
    The name of the ImageStream is what shows up in the NAME column if you dump all the ImageStream's with the `oc get is` command invocation.
  • tag : String (optional)
    The specific image tag within the ImageStream to monitor.
  • namespace : String (optional)
  • apiURL : String (optional)
  • authToken : String (optional)
  • changelog : boolean (optional)
    Enable or Disable 'Include in changelog':

    If 'Include in changelog' is enabled for an SCM source, then when a build occurs, the changes from that SCM source will be included in the changelog.

    If 'Include in changelog' is disabled, then when a build occurs, the changes from this SCM source will not be included in the changelog.

  • poll : boolean (optional)
    Enable or Disable 'Include in polling'

    If 'Include in polling' is enabled or 'Include in changelog' is enabled, then when polling occurs, the job will be started if changes are detected from this SCM source.

    If 'Include in polling' is disabled and 'Include in changelog' is disabled, then when polling occurs, changes that are detected from this repository will be ignored.

  • verbose : String (optional)

openshiftScale: Scale OpenShift Deployment

  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • replicaCount : String
    The value here should be the number of started pods desired for the deployment specified. It is the equivalent of the value supplied to --replicas with an `oc scale` command invocation. This is a required parameter. If an integer is not specified here, this build step can not be added to the job. Note: specifying a 0 is allowed, and means you do not want any pods for the specified deployment config running.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)
  • verifyReplicaCount : String (optional)
    This flag is the toggle for turning on or off the verification that the specified replica count for the deployment has been reached.
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftTag: Tag OpenShift Image

  • srcStream : String
    The name of the ImageStream for the existing tag.
  • srcTag : String
    The name of the existing tag, or an actual, existing image ID. The image referenced will have the new tag applied to it.
  • destStream : String
    One or more ImageStream names in a comma delimited list. If multiple streams and multiple destination tags are specified, the two lists must contain the same number of elements.
  • destTag : String
    One or more tag names in a comma delimited list. If multiple streams and multiple destination tags are specified, the two lists must contain the same number of elements.
  • alias : String (optional)
    This flag is the equivalent of the `--alias` option for the `oc tag` command. When false, the destination tag type is "ImageStreamImage", and when true, the destination tag type is "ImageStreamTag".
  • apiURL : String (optional)
  • authToken : String (optional)
  • destinationAuthToken : String (optional)
    The value here is what you supply with the --token option when invoking the OpenShift `oc` command. If you do not supply a value, the plugin will assume it is running in the OpenShift Jenkins image and attempt to load the kubernetes service account token stored in that image.
  • destinationNamespace : String (optional)
    The value here should match the value from the output from `oc project` if you created the resources related to this task from the command line. If nothing is specified, the plugin will inspect the PROJECT_NAME environment variable.
  • namespace : String (optional)
  • verbose : String (optional)

openshiftVerifyBuild: Verify OpenShift Build

  • bldCfg : String
    If you run `oc get bc` for the project listed in "nameSpace", that is the value you want to put here.
  • apiURL : String (optional)
  • authToken : String (optional)
  • checkForTriggeredDeployments : String (optional)
    This flag is the toggle for turning on or off the verification that any deployments triggered by this build's output fired.
  • namespace : String (optional)
  • verbose : String (optional)
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftVerifyDeployment: Verify OpenShift Deployment

  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • replicaCount : String (optional)
    This optional field's value represents the number expected running pods for the deployment for the DeploymentConfig specified. If no value is specified it will work the number of running pods against the desired replica count in the DeploymentConfig.
  • verbose : String (optional)
  • verifyReplicaCount : String (optional)
    This flag is the toggle for turning on or off the verification that the specified replica count for the deployment has been reached.
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftVerifyService: Verify OpenShift Service

  • svcName : String
    The equivalent to the name supplied to a `oc get service` command line invocation.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • retryCount : String (optional)
  • verbose : String (optional)

step([$class: 'OpenShiftBuildCanceller']): Cancel OpenShift Builds

  • apiURL : String
  • namespace : String
  • authToken : String
  • verbose : String
  • bldCfg : String
    If you run `oc get bc` for the project listed in "nameSpace", that is the value you want to put here.

step([$class: 'OpenShiftDeployCanceller']): Cancel OpenShift Deployment

  • apiURL : String
  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • namespace : String
  • authToken : String
  • verbose : String

step([$class: 'OpenShiftScalerPostAction']): Scale OpenShift Deployment

  • apiURL : String
  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • namespace : String
  • replicaCount : String
    The value here should be the number of started pods desired for the deployment specified. It is the equivalent of the value supplied to --replicas with an `oc scale` command invocation. This is a required parameter. If an integer is not specified here, this build step can not be added to the job. Note: specifying a 0 is allowed, and means you do not want any pods for the specified deployment config running.
  • authToken : String
  • verbose : String
  • verifyReplicaCount : String
    This flag is the toggle for turning on or off the verification that the specified replica count for the deployment has been reached.
  • waitTime : String
  • waitUnit : String

step([$class: 'OpenShiftBuildVerifier']): Verify OpenShift Build

  • apiURL : String
  • bldCfg : String
    If you run `oc get bc` for the project listed in "nameSpace", that is the value you want to put here.
  • namespace : String
  • authToken : String
  • verbose : String
  • checkForTriggeredDeployments : String
    This flag is the toggle for turning on or off the verification that any deployments triggered by this build's output fired.
  • waitTime : String
  • waitUnit : String

step([$class: 'OpenShiftBuilder']): Trigger OpenShift Build

  • apiURL : String
  • bldCfg : String
    If you run `oc get bc` for the project listed in "nameSpace", that is the value you want to put here.
  • namespace : String
  • env
    Specify a list of environment variables to include in the build (see `oc start-build -e ...`).
      Array / List of Nested Object
    • name : String
      The name of the environment variable to set.
    • value : String
      The value for the environment variable.
  • authToken : String
  • verbose : String
  • commitID : String
    The value here is what you supply with the --commit option when invoking the OpenShift `oc start-build` command. It allows you to point the OpenShift build to a specific commit hash from the git-log of the source repository. If you do not supply a value, the plugin assumes the latest version from the source repository should be used.
  • buildName : String
    The value here is what you supply with the --from-build option when invoking the OpenShift `oc start-build` command. It allows you to point to OpenShift build to a previously run build, and run another build with exactly the same source and destination metadata. If you do not supply a value, the plugin will generate a new OpenShift build based on the Build Configuration referenced.
  • showBuildLogs : String
    Indicates whether the build logs get dumped to the console of the Jenkins build.
  • checkForTriggeredDeployments : String
    This flag is the toggle for turning on or off the verification that any deployments triggered by this build's output fired.
  • waitTime : String
  • waitUnit : String

step([$class: 'OpenShiftCreator']): Create OpenShift Resource(s)

  • apiURL : String
  • namespace : String
  • authToken : String
  • verbose : String
  • jsonyaml : String
    The JSON or YAML formatted text that conforms to the schema for defining the various OpenShift resources.

step([$class: 'OpenShiftDeleterJsonYaml']): Delete OpenShift Resource(s) from JSON or YAML

  • apiURL : String
  • namespace : String
  • authToken : String
  • verbose : String
  • jsonyaml : String
    The JSON or YAML formatted text that conforms to the schema for defining the various OpenShift resources.

step([$class: 'OpenShiftDeleterLabels']): Delete OpenShift Resource(s) using Labels

  • apiURL : String
  • namespace : String
  • authToken : String
  • verbose : String
  • types : String
    The comma separated list of types of API objects to delete, where those objects have labels corresponding to the specified key/value pairs. See https://docs.openshift.org/latest/rest_api/index.html for the supported types.
  • keys : String
    The comma separated list of keys of the labels in the API objects to delete.
  • values : String
    The comma separated list of values of the labels in the API objects to delete.

step([$class: 'OpenShiftDeleterList']): Delete OpenShift Resource(s) by Key

  • apiURL : String
  • namespace : String
  • authToken : String
  • verbose : String
  • types : String
    The comma separated list of types of API objects to delete. See https://docs.openshift.org/latest/rest_api/index.html for the supported types.
  • keys : String
    The comma separated list of keys of the API objects to delete.

step([$class: 'OpenShiftDeployer']): Trigger OpenShift Deployment

  • apiURL : String
  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • namespace : String
  • authToken : String
  • verbose : String
  • waitTime : String
  • waitUnit : String

step([$class: 'OpenShiftDeploymentVerifier']): Verify OpenShift Deployment

  • apiURL : String
  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • namespace : String
  • replicaCount : String
    This optional field's value represents the number expected running pods for the deployment for the DeploymentConfig specified. If no value is specified it will work the number of running pods against the desired replica count in the DeploymentConfig.
  • authToken : String
  • verbose : String
  • verifyReplicaCount : String
    This flag is the toggle for turning on or off the verification that the specified replica count for the deployment has been reached.
  • waitTime : String
  • waitUnit : String

step([$class: 'OpenShiftExec']): OpenShift Exec

  • apiURL : String
  • namespace : String
  • authToken : String
  • verbose : String
  • pod : String
    The pod in which to execute a command.
  • container : String
    The container in which to execute a command. If not specified, the first container in the pod will be used.
  • command : String
    The name of the command to execute.
  • arguments
    Specify a list of arguments to pass to the command.
      Array / List of Nested Object
    • value : String
      The value for the environment variable.
  • waitTime : String
  • waitUnit : String

step([$class: 'OpenShiftImageTagger']): Tag OpenShift Image

  • apiURL : String
  • testTag : String
    The name of the existing tag, or an actual, existing image ID. The image referenced will have the new tag applied to it.
  • prodTag : String
    One or more tag names in a comma delimited list. If multiple streams and multiple destination tags are specified, the two lists must contain the same number of elements.
  • namespace : String
  • authToken : String
  • verbose : String
  • testStream : String
    The name of the ImageStream for the existing tag.
  • prodStream : String
    One or more ImageStream names in a comma delimited list. If multiple streams and multiple destination tags are specified, the two lists must contain the same number of elements.
  • destinationNamespace : String
    The value here should match the value from the output from `oc project` if you created the resources related to this task from the command line. If nothing is specified, the plugin will inspect the PROJECT_NAME environment variable.
  • destinationAuthToken : String
    The value here is what you supply with the --token option when invoking the OpenShift `oc` command. If you do not supply a value, the plugin will assume it is running in the OpenShift Jenkins image and attempt to load the kubernetes service account token stored in that image.
  • alias : String
    This flag is the equivalent of the `--alias` option for the `oc tag` command. When false, the destination tag type is "ImageStreamImage", and when true, the destination tag type is "ImageStreamTag".

step([$class: 'OpenShiftScaler']): Scale OpenShift Deployment

  • apiURL : String
  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • namespace : String
  • replicaCount : String
    The value here should be the number of started pods desired for the deployment specified. It is the equivalent of the value supplied to --replicas with an `oc scale` command invocation. This is a required parameter. If an integer is not specified here, this build step can not be added to the job. Note: specifying a 0 is allowed, and means you do not want any pods for the specified deployment config running.
  • authToken : String
  • verbose : String
  • verifyReplicaCount : String
    This flag is the toggle for turning on or off the verification that the specified replica count for the deployment has been reached.
  • waitTime : String
  • waitUnit : String

step([$class: 'OpenShiftServiceVerifier']): Verify OpenShift Service

  • apiURL : String
  • svcName : String
    The equivalent to the name supplied to a `oc get service` command line invocation.
  • namespace : String
  • authToken : String
  • verbose : String

openshiftVerifyBuild: Verify OpenShift Build

  • bldCfg : String
    If you run `oc get bc` for the project listed in "nameSpace", that is the value you want to put here.
  • apiURL : String (optional)
  • authToken : String (optional)
  • checkForTriggeredDeployments : String (optional)
    This flag is the toggle for turning on or off the verification that any deployments triggered by this build's output fired.
  • namespace : String (optional)
  • verbose : String (optional)
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftBuild: Trigger OpenShift Build

  • bldCfg : String
    If you run `oc get bc` for the project listed in "nameSpace", that is the value you want to put here.
  • apiURL : String (optional)
  • authToken : String (optional)
  • buildName : String (optional)
    The value here is what you supply with the --from-build option when invoking the OpenShift `oc start-build` command. It allows you to point to OpenShift build to a previously run build, and run another build with exactly the same source and destination metadata. If you do not supply a value, the plugin will generate a new OpenShift build based on the Build Configuration referenced.
  • checkForTriggeredDeployments : String (optional)
    This flag is the toggle for turning on or off the verification that any deployments triggered by this build's output fired.
  • commitID : String (optional)
    The value here is what you supply with the --commit option when invoking the OpenShift `oc start-build` command. It allows you to point the OpenShift build to a specific commit hash from the git-log of the source repository. If you do not supply a value, the plugin assumes the latest version from the source repository should be used.
  • env (optional)
    Specify a list of environment variables to include in the build (see `oc start-build -e ...`).
      Array / List of Nested Object
    • name : String
      The name of the environment variable to set.
    • value : String
      The value for the environment variable.
  • namespace : String (optional)
  • showBuildLogs : String (optional)
    Indicates whether the build logs get dumped to the console of the Jenkins build.
  • verbose : String (optional)
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftCreateResource: Create OpenShift Resource(s)

  • jsonyaml : String
    The JSON or YAML formatted text that conforms to the schema for defining the various OpenShift resources.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)

openshiftDeleteResourceByJsonYaml: Delete OpenShift Resource(s) from JSON or YAML

  • jsonyaml : String
    The JSON or YAML formatted text that conforms to the schema for defining the various OpenShift resources.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)

openshiftDeleteResourceByLabels: Delete OpenShift Resource(s) using Labels

  • types : String
    The comma separated list of types of API objects to delete, where those objects have labels corresponding to the specified key/value pairs. See https://docs.openshift.org/latest/rest_api/index.html for the supported types.
  • keys : String
    The comma separated list of keys of the labels in the API objects to delete.
  • values : String
    The comma separated list of values of the labels in the API objects to delete.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)

openshiftDeleteResourceByKey: Delete OpenShift Resource(s) by Key

  • types : String
    The comma separated list of types of API objects to delete. See https://docs.openshift.org/latest/rest_api/index.html for the supported types.
  • keys : String
    The comma separated list of keys of the API objects to delete.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)

openshiftDeploy: Trigger OpenShift Deployment

  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftVerifyDeployment: Verify OpenShift Deployment

  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • replicaCount : String (optional)
    This optional field's value represents the number expected running pods for the deployment for the DeploymentConfig specified. If no value is specified it will work the number of running pods against the desired replica count in the DeploymentConfig.
  • verbose : String (optional)
  • verifyReplicaCount : String (optional)
    This flag is the toggle for turning on or off the verification that the specified replica count for the deployment has been reached.
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftExec: OpenShift Exec

  • pod : String
    The pod in which to execute a command.
  • apiURL : String (optional)
  • arguments (optional)
    Specify a list of arguments to pass to the command.
      Array / List of Nested Object
    • value : String
      The value for the environment variable.
  • authToken : String (optional)
  • command : String (optional)
    The name of the command to execute.
  • container : String (optional)
    The container in which to execute a command. If not specified, the first container in the pod will be used.
  • namespace : String (optional)
  • verbose : String (optional)
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftTag: Tag OpenShift Image

  • srcStream : String
    The name of the ImageStream for the existing tag.
  • srcTag : String
    The name of the existing tag, or an actual, existing image ID. The image referenced will have the new tag applied to it.
  • destStream : String
    One or more ImageStream names in a comma delimited list. If multiple streams and multiple destination tags are specified, the two lists must contain the same number of elements.
  • destTag : String
    One or more tag names in a comma delimited list. If multiple streams and multiple destination tags are specified, the two lists must contain the same number of elements.
  • alias : String (optional)
    This flag is the equivalent of the `--alias` option for the `oc tag` command. When false, the destination tag type is "ImageStreamImage", and when true, the destination tag type is "ImageStreamTag".
  • apiURL : String (optional)
  • authToken : String (optional)
  • destinationAuthToken : String (optional)
    The value here is what you supply with the --token option when invoking the OpenShift `oc` command. If you do not supply a value, the plugin will assume it is running in the OpenShift Jenkins image and attempt to load the kubernetes service account token stored in that image.
  • destinationNamespace : String (optional)
    The value here should match the value from the output from `oc project` if you created the resources related to this task from the command line. If nothing is specified, the plugin will inspect the PROJECT_NAME environment variable.
  • namespace : String (optional)
  • verbose : String (optional)

openshiftScale: Scale OpenShift Deployment

  • depCfg : String
    If you run `oc get dc` for the project listed in "nameSpace", that is the value you want to put here.
  • replicaCount : String
    The value here should be the number of started pods desired for the deployment specified. It is the equivalent of the value supplied to --replicas with an `oc scale` command invocation. This is a required parameter. If an integer is not specified here, this build step can not be added to the job. Note: specifying a 0 is allowed, and means you do not want any pods for the specified deployment config running.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • verbose : String (optional)
  • verifyReplicaCount : String (optional)
    This flag is the toggle for turning on or off the verification that the specified replica count for the deployment has been reached.
  • waitTime : String (optional)
  • waitUnit : String (optional)

openshiftVerifyService: Verify OpenShift Service

  • svcName : String
    The equivalent to the name supplied to a `oc get service` command line invocation.
  • apiURL : String (optional)
  • authToken : String (optional)
  • namespace : String (optional)
  • retryCount : String (optional)
  • verbose : String (optional)

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.