Giter Club home page Giter Club logo

fast-circle's Introduction

Fast circle

It connects on circle and look for repeated builds in the same branch. It cancel the old builds keeping only latest commit in each branch.

It doesn't cancel builds on master branch.

Setup your keys

  1. Create or get your key on Circle CI api.
  2. Set your environment variable on a .env file in the main directory of these project

I recommend you to use .env with the following keys.

CI_TOKEN=myAwesomeToken
CI_REPOSITORY="ideia.me"
CI_USERNAME="jonatas"

Test if it works in localhost

ruby ./avoid-double-build-on-branch.rb

Deploying to heroku

Create the repo on heroku:

heroku create

Setup your keys on heroku:

heroku config:set CI_TOKEN=myAwesomeToken \
  CI_REPOSITORY="ideia.me" \
  CI_USERNAME="jonatas"

Test on heroku

heroku run ruby ./avoid-double-build-on-branch.rb

If it works like in heroku via heroku run, configure it to heroku scheduler.

Setup the Heroku Scheduler

heroku addons:create scheduler:standard

Configure it via web:

heroku addons:open scheduler

Click on "Add Job..."

After that, fill on "run command" input field:

ruby ./avoid-double-build-on-branch.rb

Configure it to run each 10 minutes.

fast-circle's People

Contributors

jonatas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

silzemar

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.