https://github.com/anti-work/circleci-canceller
Cancels superfluous CircleCI builds. Builds are cancelled if there is a newer build queued for the same branch.
https://github.com/anti-work/circleci-canceller
Last synced: 8 months ago
JSON representation
Cancels superfluous CircleCI builds. Builds are cancelled if there is a newer build queued for the same branch.
- Host: GitHub
- URL: https://github.com/anti-work/circleci-canceller
- Owner: anti-work
- License: mit
- Created: 2015-04-22T14:37:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-07T21:16:08.000Z (almost 10 years ago)
- Last Synced: 2025-02-16T22:59:23.265Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 215 KB
- Stars: 1
- Watchers: 12
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CircleCI Canceller
A clockwork application that cancels superfluous builds in queue or running.
## Features
* Collects new build state frequently, once every 20 seconds.
* Cancels builds if a newer build is queued for the same branch.
* Ignores select branches.
* Ignores builds that are already in or have completed the deployment phase.
* Ignores builds that have been buildings for X mins (if they are marked as a deploy branch).## Usage
Deploy to Heroku with the following environment variables:
* CIRCLECI_USERNAME e.g. `gumroad`
* CIRCLECI_PROJECTS e.g. `web api`
* CIRCLECI_API_TOKEN_[project] e.g. `a17098...`
* BRANCHES_TO_IGNORE_[project] e.g. `master staging`
* BRANCHES_THAT_DEPLOY_[project] e.g. `deploy`
* BRANCHES_WITH_SAFE_TIME_[project] e.g. `deploy,5 newfeature,2` (deploy won't be cancelled if it's been building for 5 minutes, similarly for newfeature with 2 minutes)```bash
CIRCLECI_USERNAME=gumroad
CIRCLECI_PROJECTS=web apiCIRCLECI_API_TOKEN_web=a17098...
BRANCHES_TO_IGNORE_web=master staging
BRANCHES_THAT_DEPLOY_web=deploy
BRANCHES_WITH_SAFE_TIME_web=deploy,5CIRCLECI_API_TOKEN_api=ba7698...
BRANCHES_THAT_DEPLOY_api=master
```