Skip to content

Instantly share code, notes, and snippets.

@billhorsman
Created September 2, 2012 22:35
Show Gist options
  • Select an option

  • Save billhorsman/3605244 to your computer and use it in GitHub Desktop.

Select an option

Save billhorsman/3605244 to your computer and use it in GitHub Desktop.
Circle CI Config for deployment to Heroku with 10 min timeout
deployment:
staging:
branch: master
commands:
- git push git@heroku.com:yakify-ci.git:
timeout: 600
dependencies:
pre:
- gem uninstall bundler
- gem install bundler --pre
@arohner

arohner commented Sep 4, 2012

Copy link
Copy Markdown

deployment:

staging:
branch: master
commands:
- git push git@heroku.com:yakify-ci.git:
timeout: 600

dependencies:
pre:
- gem uninstall bundler
- gem install bundler --pre

@arohner

arohner commented Sep 4, 2012

Copy link
Copy Markdown
deployment:
  staging:
    branch: master
    commands:
      - git push git@heroku.com:yakify-ci.git:
          timeout: 600

Because of YAML oddities, the timeout needs to be indented four spaces past the '-', not two.

@turadg

turadg commented Dec 20, 2012

Copy link
Copy Markdown

One might need the CIRCLE_SHA1:


deployment:
  staging:
    branch: master
    commands:
      - git push git@heroku.com:APP-NAME.git $CIRCLE_SHA1:master:
          timeout: 600

@antonagestam

Copy link
Copy Markdown

I'm using fabric to push stuff for me, but otherwise very similar to your code, but I can't get the timeout value to work properly:

deployment:
  production:
    branch: master
    commands:
      - fab d_prod
          timeout: 600
  staging:
    branch: stage
    commands:
      - fab d_stage
          timeout: 600

Circle complains with

Syntax Error while parsing circle.yml: mapping values are not allowed here in "", line 16, column 16: timeout: 360 ^

Would one of you happen to know why?

@pbiggar

pbiggar commented Jul 7, 2013

Copy link
Copy Markdown

@antonagestam You need a colon at the end of fab d_stage and fab d_prod.

@tomeara

tomeara commented Nov 26, 2014

Copy link
Copy Markdown

Nice! I didn't know you could use timeout on just any command like that in Circle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment