Fixes #737: on_error support for Steps (Concourse)

This commit is contained in:
Kris De Volder
2022-06-24 10:29:04 -07:00
parent b80fc5d8ba
commit 078d1b1983
3 changed files with 52 additions and 1 deletions

View File

@@ -450,6 +450,7 @@ public class PipelineYmlSchema implements YamlSchema {
addProp(step, subStep, "on_success", step);
addProp(step, subStep, "on_failure", step);
addProp(step, subStep, "on_abort", step);
addProp(step, subStep, "on_error", step);
addProp(step, subStep, "ensure", step);
addProp(step, subStep, "tags", t_strings);
addProp(step, subStep, "timeout", t_duration);

View File

@@ -0,0 +1,17 @@
A hook step to execute after the parent step if the parent step terminates abnormally
in any way other than those handled by the [on_abort](https://concourse-ci.org/on-abort-hook.html#schema.on_abort)
or [on_failure](https://concourse-ci.org/on-failure-hook.html#schema.on_failure).
This covers scenarios as broad as configuration mistakes, temporary network issues with the workers,
or running longer than a timeout.
##Example: Send a notification
```
plan:
- do:
- get: ci
- task: unit
file: ci/unit.yml
on_error:
put: slack
```