Cancel other pipelines if one fails

I’m two pipelines in my drone.yml which run concurrently (multi-machine). If one fails, the other one still runs to completion, even though the entire run is guaranteed to fail at this point. This ties up our agents unnecessarily; is there any way to configure Drone so that it cancels all pipelines if one fails?

There is not, but you can extend Drone through system webhooks. In the scenario you described, when a pipeline fails a webhook would be triggered. The webhook payload should have all the data required to determine whether or not other pipelines are still running. If yes, you could use the Drone API to cancel the build, and therefore cancel all remaining steps.

For more details check out How to use Global Webhooks