86
Auto-cancel builds for default branch
E
Emil Ong
Originally asked here: https://discuss.circleci.com/t/auto-cancel-builds-on-default-branch/5536
We would like auto-cancel to apply to the default branch, specifically because we have a deploy action associated with it. The deploy is slow and multiple builds are often racing with each other and we occasionally get an older build that finishes after a newer one, leaving us with older code deployed. (This is only for a staging environment deploy in our case though.)
CCI-I-214
Activity
Newest
Oldest
arnorhs
what's up with this feature? I'd really like to be able to auto-cancel the default branch build, but this issue/feature seems to have gone pretty quiet, is there a new/different approach to this these days?
D
Davin Ryan
With trunk based development being an important shift to delivery faster these days this is a must have feature for us
C
Celestine Kao
If you use AWS, check out the workflow-manager orb
J
Joep Kemperman
We would also like this. We don't automatically deploy our default branch, but we do have a couple projects where we often merge several PR's in a short time. Their builds take more than an hour, so this results in either a bunch of wasteful builds, or having to manually cancel these builds.
N
Naotoshi Seo
Same here. We use the default
master
branch as a development branch. We want to auto-cancel redundant builds.N
Neil Poulin
I agree with the original poster. Or, something else that might be nice in the meantime is the ability to auto-cancel jobs are in a Holding status after X of them are in that status. Meaning, We have a bunch of builds that are awaiting prod - since they're not auto-cancelling, i'll end up with a large number of jobs waiting to be promoted to production. My suggestion is to only hang onto the last X number (3, 5, 10) of them, and cancel the rest since it's very unlikely that we'll ever promote such an old build.