errorStrategy
The errorStrategy directive defines how to handle task failures.
A task failure occurs when the executed script returns a non-zero exit code. By default, the pipeline run is aborted.
Options
The following error strategies are available: When a task fails, terminate the pipeline immediately and report an error. Pending and running jobs are killed. When a task fails, wait for submitted and running tasks to finish and then terminate the pipeline, reporting an error. When a task fails, ignore it and continue the pipeline execution. The failure is reported as a message, but the run is not stopped. For example: By default, the pipeline completes successfully and returns an exit status of 0. If the When a task fails, retry it. For example: Use the maxRetries and maxErrors directives to limit the number of retries. Use a dynamic 'terminate' (default)'finish''ignore'process hello {
errorStrategy 'ignore'
// ...
}workflow.failOnIgnore config option is set to true, the pipeline returns a non-zero exit status and reports the failed tasks as an error upon completion. See the workflow namespace for more information.'retry'process hello {
errorStrategy 'retry'
// ...
}errorStrategy to define more complex strategies based on the task exit status or other parametric values. See Dynamic directives for details.