Any step can have
ensure tacked onto it, whose value is a second step to execute regardless of the result of the parent step.
The step to execute. Regardless of whether the parent step succeeds, fails, or errors, this step will be executed. The step will also be executed if the build was aborted, and its parent step was interrupted.
If the parent step succeeds and the ensured step fails, the parent step is considered to have failed.
Releasing a Lock
For example, the following build plan acquires a lock, and then
ensures that the lock is released.
plan: - put: some-lock params: acquire: true - task: integration file: foo/integration.yml ensure: put: some-lock params: release: some-lock