Created
November 14, 2013 21:39
-
-
Save joshwlewis/7474788 to your computer and use it in GitHub Desktop.
Wercker configuration for Ruby 2.0, Rails 4.0, Rspec, Postgres stack with deployment to Heroku and Hipchat notifications.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box: wercker/ubuntu12.04-ruby2.0.0 | |
services: | |
- wercker/postgresql | |
build: | |
steps: | |
- bundle-install | |
- rails-database-yml | |
- script: | |
name: db:setup | |
code: bundle exec rake db:setup | |
- script: | |
name: echo ruby information | |
code: | | |
echo "ruby version $(ruby --version) running" | |
echo "from location $(which ruby)" | |
echo -p "gem list: $(gem list)" | |
- script: | |
name: rspec | |
code: bundle exec rspec | |
after-steps: | |
- hipchat-notify: | |
token: $HIPCHAT_TOKEN | |
room-id: 123456 | |
from-name: wercker | |
deploy: | |
steps: | |
- heroku-deploy: | |
key-name: WERCKER_HEROKU_KEY | |
- script: | |
name: migrate database | |
code: heroku run rake db:migrate --app $WERCKER_HEROKU_DEPLOY_APP_NAME | |
after-steps: | |
- hipchat-notify: | |
token: $HIPCHAT_TOKEN | |
room-id: 123456 | |
from-name: wercker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hopefully this will save someone some effort.
$WERCKER_HEROKU_KEY
: needs to exist as an environment variable in a deploy target that points to an ssh-key (in Wercker's web interface). Make sure that key is added to your heroku account.$HIPCHAT_TOKEN
: needs to be an environment variable for your application (also in Wercker's web interface). Also, you'll need to figure out your ownroom-id
.$WERCKER_HEROKU_DEPLOY_APP_NAME
: You shouldn't need to set this, this is configured by the heroku-deploy step.