Skip to content

Instantly share code, notes, and snippets.

@billhorsman
Created September 2, 2012 22:35
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save billhorsman/3605244 to your computer and use it in GitHub Desktop.
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
Copy link

arohner commented Sep 4, 2012

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
Copy link

arohner commented Sep 4, 2012

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
Copy link

turadg commented Dec 20, 2012

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

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
Copy link

pbiggar commented Jul 7, 2013

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

@tomeara
Copy link

tomeara commented Nov 26, 2014

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