Task

A discrete unit of work in a pipeline execution that does one thing and one thing only.

public interface Task implements SpinnakerExtensionPoint

Types

Aliases
Link copied to clipboard

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

@interface Aliases

Functions

aliases
Link copied to clipboard

A collection of known aliases.

Collection<Stringaliases()
execute
Link copied to clipboard

Execute the business logic of the task, using the provided stage execution state.

@Nonnull()
abstract TaskResult execute(StageExecution stage)
getExtensionClass
Link copied to clipboard
Class<? extends SpinnakerExtensionPointgetExtensionClass()
onCancel
Link copied to clipboard

Behavior to be called on Task cancellation.

This method should be used if you need to perform cleanup in response to the task being cancelled before it was able to complete.

void onCancel(StageExecution stage)
onTimeout
Link copied to clipboard

Behavior to be called on Task timeout.

This method should be used if you need to perform any cleanup operations in response to the task being aborted after taking too long to complete.

@Nullable()
TaskResult onTimeout(StageExecution stage)

Inheritors

RetryableTask
Link copied to clipboard