Code Monkey home page Code Monkey logo

circle_reaper's Introduction

Circle Reaper CircleCI

A Github bot that cancels redundant circle builds!

Circle Reaper scans your repository after a push and cancels all but the latest build on any given branch (except master!).

Based on the fine work of mikeastock's pipefitter

How to Run

rackup && sidekiq -C config/sidekiq.yml -r ./boot.rb

Configuration

Env vars

  • REDIS_URL set for redis
  • SIDEKIQ_USERNAME & SIDEKIQ_PASSWORD for sidekiq authentication
  • CIRCLECI_TOKEN for circle access
  • SECRET_TOKEN set this as the secret in the Github Webhook for authentication (optional)
  • TEST_BRANCH set this as a branch name and Circle Reaper will only run on that branch (optional)

How to use

Setup

  • Have this app exposed and running with a url (heroku is great for this)
  • Add a Github Webhook for your exposed endpoint (ex: http://mysite.com/payload)

Tips

  • Adding [run circle] to your commit will skip this bot

Limitations

  • Right now if any commits in a push contain "[run circle]" all commits will run circle.
  • If you push right after a "[run circle]" commit, circle will be cancelled.

Local Testing

I use ngrok and the command ngrok http 9292

circle_reaper's People

Contributors

michaelstephens avatar mikeastock avatar

Watchers

 avatar

circle_reaper's Issues

Don't cancel builds on master

A circle build of master should never be cancelled. This can be implemented in the circle_worker.rb as a branch check

Properly cancel only 1 commit

Right now if any commits in a push contains "[run circle]" all the commits will run and not just the one that claims run circle.

The way we cancel builds will need to change in order to accommodate this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.