Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Builds auto cancellation #1980

Closed
PeterDaveHello opened this issue Mar 26, 2017 · 6 comments
Closed

[Feature] Builds auto cancellation #1980

PeterDaveHello opened this issue Mar 26, 2017 · 6 comments
Milestone

Comments

@PeterDaveHello
Copy link

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).

@luxifer
Copy link

luxifer commented May 2, 2017

I'll have a look at this

@ozbillwang
Copy link

ozbillwang commented Aug 22, 2017

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.

@casiodk
Copy link

casiodk commented Feb 15, 2018

How far is the feature from release?

@bradrydzewski bradrydzewski modified the milestones: v1.0.0 maybe, v1.0.0 Apr 2, 2018
@bradrydzewski bradrydzewski added this to To Do in Version 1.0 Apr 2, 2018
@bradrydzewski bradrydzewski removed this from To Do in Version 1.0 Jun 29, 2018
@bradrydzewski bradrydzewski modified the milestones: v1.0.0, v1.1.0 Apr 9, 2019
@bradrydzewski bradrydzewski added this to the v1.x.x milestone Apr 19, 2019
@leandromatos
Copy link

Any update of this feature?

@bradrydzewski
Copy link

bradrydzewski commented Sep 17, 2019

we do not have any updates to share. if / when we have updates to share we will comment on the issue accordingly.

@bradrydzewski bradrydzewski modified the milestones: v1.x.x, v1.6.0 Sep 24, 2019
@bradrydzewski
Copy link

bradrydzewski commented Oct 2, 2019

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

@harness harness deleted a comment from shqear93 Oct 17, 2019
@harness harness locked and limited conversation to collaborators Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants