StageDefinitionBuilder

Provides a low-level API for building stages.

A stage in its simplest form will consist of a series of Tasks that are executed serially. However, a stage can also configure other stages to be run before it, or after it, and or on failure only. This can enable you to build stages which compose and abstract the details of other stages.

public interface StageDefinitionBuilder implements SpinnakerExtensionPoint

Types

Aliases
Link copied to clipboard

Allows backwards compatibility of a stage's "type", even through class renames / refactors.

@interface Aliases

Functions

afterStages
Link copied to clipboard

Implement this method to define any stages that should run after any tasks in this stage as part of a composed workflow.

void afterStages(StageExecution parent, StageGraphBuilder graph)
aliases
Link copied to clipboard

A collection of known aliases.

Collection<Stringaliases()
beforeStages
Link copied to clipboard

Implement this method to define any stages that should run before any tasks in this stage as part of a composed workflow.

void beforeStages(StageExecution parent, StageGraphBuilder graph)
buildTaskGraph
Link copied to clipboard
@Nonnull()
TaskNode.TaskGraph buildTaskGraph(StageExecution stage)
canManuallySkip
Link copied to clipboard

Return true if the stage can be manually skipped from the API.

boolean canManuallySkip(StageExecution stage)
getExtensionClass
Link copied to clipboard
Class<? extends SpinnakerExtensionPointgetExtensionClass()
getType
Link copied to clipboard

Returns the stage type this builder handles.

@Nonnull()
String getType()

Get the pipeline configuration-friendly type name for this stage.

If a stage class is {@code MyFancyStage} , the resulting type would be {@code myFancy} .

static String getType(Class<? extends StageDefinitionBuilderclazz)
onFailureStages
Link copied to clipboard

Implement this method to define any stages that should run in response to a failure in tasks, before or after stages.

void onFailureStages(StageExecution stage, StageGraphBuilder graph)
prepareStageForRestart
Link copied to clipboard

Implementations can override this if they need any special cleanup on restart.

void prepareStageForRestart(StageExecution stage)
taskGraph
Link copied to clipboard

Implement this method to define any tasks that should run as part of this stage's workflow.

void taskGraph(StageExecution stage, TaskNode.Builder builder)