We use deploy markers in our deploy job, one marker per environment:
circleci run release plan <name> --component-name ... --environment-name ... --target-version ...,
then update --status=running, and SUCCESS/FAILED at the end.
After cancelling a deployment the marker stays at RUNNING permanently. We have not found a way to correct it.
What we tested:
- A companion job wired with
requires: [deploy: [canceled]]does not run when theworkflow is cancelled. It is cancelled along with everything else and no job record is created for it. - A
when: alwaysstep inside the cancelled job does not run either. - A marker planned by a cancelled workflow still read RUNNING on the Deploys dashboard half an hour later, so nothing transitions it server-side.
Two questions:
-
Is there a way to execute something when a workflow gets cancelled?
-
Failing that, is there a supported way to update a marker from outside the
workflow that planned it?
If we are holding this wrong, that would be good to hear too.