Arguments available to the Pipeline.createStage method.
Type | Name and description |
---|---|
java.lang.String |
baseDirectory Base directory of the stage. |
boolean |
displayAnsiColor If we want to display colorful job output. |
boolean |
displayTimestamp If we want to display timestamp on job log. |
boolean |
doesIgnoreSkipAll Can the stage ignore a skip all condition. |
java.util.Map<java.lang.String, java.lang.String> |
environment Environmental variables passed to the stage. |
boolean |
isSkippable Can the stage be skipped via a build parameter. |
java.lang.String |
name The name of the stage. |
ResultEnum |
resultThreshold Minimum build health needed for this stage to execute. |
groovy.lang.Closure |
shouldExecute A custom closure function that has the ability to skip the stage if it returns false. |
groovy.lang.Closure |
stage The operation to execute for the stage. |
org.zowe.jenkins_shared_library.pipelines.base.models.StageTimeout |
timeout Amount of time allowed for this stage. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Base directory of the stage.
By assigning a value to baseDirectory, the whole stage will be wrapped with
dir(baseDirectory) {}.
If we want to display colorful job output.
If this option is true, the whole stage job log will be wrapped with
ansiColor('xterm') {}. This feature requires
AnsiColorplugin to be installed on Jenkins.
If we want to display timestamp on job log.
If this option is true, the whole stage job log will be wrapped with
timestamps {}. This feature requires
timestamperplugin to be installed on Jenkins.
Can the stage ignore a skip all condition.
There are some scenarios that will cause the pipeline to internally skip all remaining stages. If this option is set to true, the stage will be allowed to execute under this condition. This will not negate any skip criteria defined by shouldExecute or resultThreshold
Environmental variables passed to the stage.
Environmental variables will be set through the Jenkins withEnv step. Map keys indicate the environment variable name, and values represent the value.
Can the stage be skipped via a build parameter.
If this option is true, then a build parameter will be created that controls if this stage is skipped for the current run.
The name of the stage.
Failure to provide this attribute will lead to unexpected runs of the pipeline.
This attribute must be unique across all stages added to the current pipeline. Any duplicates will result in an error.
Minimum build health needed for this stage to execute.
If the current build health is less than the value specified, the stage will be skipped.
For more information about the skip precedent, see Pipeline.createStage
A custom closure function that has the ability to skip the stage if it returns false.
The purpose of this function is to give you more control over how stage execution occurs in your pipeline. If the closure provided evaluates to false, the stage it is applied to will be skipped.
For more information about the skip precedent, see Pipeline.createStage
{ -> true
}
The operation to execute for the stage.
When the closure is called, it will be passed a single parameter. This parameter is the evaluated string name of the stage. This name can be used to obtain the stage object if desired. If the stage object is accessed, avoid making any changes to the internal state. Changes to the internal state may cause instabilities in your pipeline.
This operation will be executed inside of a Jenkins stage. Failure to provide this attribute will result in an java.lang.NullPointerException.
Amount of time allowed for this stage.
If no value is provided, the timeout will be the default values of StageTimeout