Annotate your builds and run extra steps
Post-step operations are a set of optional predefined processes that can be configured on any step. These operations will be executed once the step has completed. The post-step operations allow you to annotate your builds, images and pipelines with extra metadata or run other steps.
Result Aware Post-Step Operations
You may execute post-step operations conditionally, based on the outcome of the step itself.
To execute operations only when the step has completed successfully, use
To execute operations only when the step has failed, use
Result Agnostic Post-Step Operations
You may execute post-step operations regardless of the outcome of the step itself.
To execute operations regardless of the result, use
Available Post-Step Operations
Marking a Docker image with the results of unit tests:
Running other steps
If you want to run another step in the pipeline when another step fails or succeeds you need to use conditional execution of steps and the
fail_fast property. You can also use step hooks for dedicated post step actions.
In this example the step
print_error_message will only run if step
run_tests has failed.