we have a dynamically generated pipeline that runs a few apps deployments in phases (let’s say deploy, config, start) that depend on each other. Eg: apps A, B and C each have all these phases.
I want to add a step at the end of the build to cleanup some leftover files, but I need to wait for these steps to come to completion before doing it. In the same manner, if they fail, I want to run this cleanup step too.
AFAIU, if I add these deployments’ steps as dependencies, even if I accept failures, my cleanup step won’t run because the dependent steps never run if their dependencies fail. EG: I can depend on deploy, config, start, but start may never run, or I can depend on start and have the same issue.
Is there a way to say: when this build is considered finished (succeeded, failed, canceled, whatever), just run another step?
Reading through your post I think wait step might be easiest way to achieve that — running cleanup at the end of the pipeline, regardless result of previous steps.