As discussion in:
http://discourse.drone.io/t/feature-build-auto-cancel/401
It'll be good to have a feature to automatically cancel the builds on a single branch or pull request, this can really help to save resources on CI cluster when a user is keep committing or changing something especially on GitHub web GUI since they can't work on multiple fine at a single time, may trigger 5~10 builds or even more, which can cause a huge resource wasting(especially on the builds having huge building works or on the fat repo like @cdnjs).
I'll have a look at this
Got updates from @bradrydzewski , quote here
note that we would not cancel a running build when new commits are received, because it could negatively impact things like deployments. Instead we will cancel pending (non-running) builds in favor of the newer commits
Our user case and my reply:
Thanks. I still prefer the feature to cancel a running build, because in our pipeline, build in feature branches are not really apply the changes, only unit test, integration test, and only apply the changes in dev environment. So it is fine to cancel the running job in some cases.
Build Job in our pipeline tasks about 20 minutes, with this feature, It will save a lot of time for developers. I'd like to have this feature as an option which I can define to switch it on or off.
How far is the feature from release?
Any update of this feature?
we do not have any updates to share. if / when we have updates to share we will comment on the issue accordingly.
we have an initial implementation of this feature available in release 1.6.x and higher. You can automatically cancel pending push or pull requests if a newer build is scheduled. You can configure this behavior from the command line using the following:
$ drone repo update --auto-cancel-pull-requests=false octocat/hello-world
$ drone repo update --auto-cancel-pushes=false octocat/hello-world
note that we do not cancel running builds. I know this was mentioned above, however, this is not something we plan to implement. If you need this feature, you can implement a custom webhook to handle canceling running builds. https://github.com/drone/boilr-webhook
Most helpful comment
we have an initial implementation of this feature available in release 1.6.x and higher. You can automatically cancel pending push or pull requests if a newer build is scheduled. You can configure this behavior from the command line using the following:
note that we do not cancel running builds. I know this was mentioned above, however, this is not something we plan to implement. If you need this feature, you can implement a custom webhook to handle canceling running builds. https://github.com/drone/boilr-webhook