Create the various stages of a pipeline.
Stages stages = new Stages() // Add some stages // Your stages should be filled out, just using the map stage constructor // here. stages.add(name: "Stage 1") stages.add(name: "Stage 2") // Execute the stages stages.execute() // Stage 1 will be executed // then Stage 2 will be executed
Type | Name and description |
---|---|
Stage |
firstFailingStage |
Type Params | Return Type | Name and description |
---|---|---|
|
Stages |
add(Stage stage) Add a stage to be executed. |
|
void |
execute() Executes the pipeline stages in the order that they were added. |
|
Stage |
getFirstFailingStage() Get the first failing stage of the pipeline. |
|
Stage |
getFirstStageToExecute() Get the first stage of the pipeline. |
|
Stage |
getStage(java.lang.String stageName) Gets a stage from the pipeline by name. |
|
void |
setFirstFailingStage(Stage stage) Set the value of the first failing stage. |
|
int |
size() Gets the number of stages added to the pipeline. |
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() |
Add a stage to be executed.
The stage will be added at the end of the list of stages to be executed.
Stages stages = new Stages() stages.add(name: "Stage 1").add(name: "Stage 2")
stage
- The stage to add to the pipeline.Executes the pipeline stages in the order that they were added.
Get the first failing stage of the pipeline.
Get the first stage of the pipeline. (I.E. the first stage added with add(Stage)
Gets a stage from the pipeline by name.
stageName
- The name of a stage.Set the value of the first failing stage.
If the first failing stage is set, this method will not overwrite that value. Instead it will silently pass.
stage
- A stage that was added using add(Stage)Gets the number of stages added to the pipeline.