Examples

Running on Error

The following will perform the second task only if the first one errors:

plan:
- get: foo
- task: unit
  file: foo/unit.yml
  on_error:
    task: alert
    file: foo/alert.yml

1.7.1.11 on_error step hook

Any step can have on_error tacked onto it, whose value is a second step to execute only if the parent step errors.

on_error: step

The step to execute when the parent step errors. If the attached step fails, the outer step is considered to have failed.