Issue: 1. Imagine a pipeline that spins up 3rd party services or containers that would usually be "cleaned" up at the end of a pipeline, but if that pipeline fails, the final clean up job will never be given the chance to run.
2. Currently sending out any kind of notification data to third-party services while running in a pipeline can be difficult, both for the reason already described above, as well as the fact that the results and data for that pipeline will not be available to the API until after the pipeline has run, limiting the amount of information that can be exported. Solution: The ability to specify that a job will execute after the pipeline has run. This should run regardless of how the pipeline ended (or should be configurable). This job should have access to all of the pipeline data for that pipeline (where currently the API does not update until the pipeline has finished).
This feature will enable a number of notification, stats, and reporting orbs and greatly improve interactivity with external services utilized within pipelines.Related: https://ideas.circleci.com/ideas/CCI-I-1227
CCI-I-1300