Circle Workflow on failure lets you run a job (on_fail) can the same be added on on_cancel
D
Daniel Janicek
In my opinion, this is a bug and needs to be fixed. The whole point of
on_fail
or always
is to run some job as cleanup when the pipeline doesn't complete successfully. When a pipeline doesn't complete in an abnormal way(cancellation) that's exactly when we need these jobs to run most. It's how most other setup/teardown code works and is expected to work.Yuri Kretov
on_cancel
would be nice! If it is too much work to make a full feature, maybe this functionality would be OK:- when user "cancels" via UI, send a signal like SIGINTorSIGTERM(or whatever is notSIGKILL)
- wait for GRACEFUL_SHUTDOWN_PERIOD(configurable by user within a reasonable range [1..60sec] or so
- then send SIGKILL (as it currently does)
This is a small effort (for circleci team) but it would help a lot of people happy about handling circleci "cancel" event gracefully...
RESUME: all you need to introduce is couple of new parameters:
- KILL_SIGNAL (from pre-defined range of well-know signals)
- GRACEFUL_SHUTDOWN_PERIOD - int from a range
Owen Allen
The issue facing us here is that we deploy an app to a kubernetes cluster to run tests on it. In the case of the cancelled job, the app is just left there running the Kube and we can't do anything about it. We need the ability to have some way to listen for a cancel so that we can undeploy the app in the event of a cancel.
Mario Jimenez
We need to be able to catch event on the platform somewhere, in our case Cancel button works for CircleCI it kills everything but in Salesforce validations in the org continue working and theres nothing we can do if the Cancel comes in from CircleCI UI
M
Md Risul Karim
This feature is very urgently needed for any Unity Engine project. Unity Licenses are checked before building a project, and the license is supposed to be released afterwards. If developers want to stop the build in between, they can't really release the licenses. It causes a major blocker in the whole CI pipeline as we have manually release the licenses later. Please add on_cancel feature.
Dragos Campean
This would definitely be useful for workflows which run jobs which start an external service (like genymotion emulators) and are also charged with stoppping the emulator. Currently if the workflow is canceled after emulator start, the service burns through $$$ until its stopped by a cleanup job
Oleksandr Rykhalskiy
It'll be extremely useful feature for our pipelines which significantly improve our abilities to control pipeline execution
Vitalii Fomenko
It will be a really helpful, as in our case workflow used to trigger tests on our environment. It start remote container which run tests.
If we cancel workflow it cancel all jobs on CircleCI side but remote container stay in run state. So some "on_cancel" option can solve our problem.
W
Westbrook Johnson
I'd love this, too. We run visual regression tests in a workflow and when it fails I'd like to open a job/workflow that allows for the diffs to be reviewed/approved.