Skip to content

Instantly share code, notes, and snippets.

@nabinno
Forked from flenter/gist:bbcee41fe7e70752bc24
Created July 21, 2014 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nabinno/e1d5d11c5513520917b0 to your computer and use it in GitHub Desktop.
Save nabinno/e1d5d11c5513520917b0 to your computer and use it in GitHub Desktop.
box: wercker/rvm
# Build definition
# See the Rails section on the wercker devcenter:
# http://devcenter.wercker.com/articles/languages/ruby/settingup-rails4.html
# You will want to define your database as follows:
services:
- wercker/postgresql
# See more about services on our devcenter:
# http://devcenter.wercker.com/articles/services/
build:
steps:
# Uncomment this to force RVM to use a specific Ruby version
# - rvm-use:
# version: 2.1.0
# A step that executes `bundle install` command
- bundle-install
# A step that prepares the database.yml using the database in services
- rails-database-yml:
service: postgresql
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
- script:
name: echo ruby information
code: |
echo "ruby version $(ruby --version) running"
echo "from location $(which ruby)"
echo -p "gem list: $(gem list)"
# Add more steps here:
# - script:
# name: Set up DB
# code: bundle exec rake db:schema:load RAILS_ENV=test
#
# - script:
# name: RSpec
# code: bundle exec rspec
deploy:
steps:
- heroku-deploy:
install-toolbelt: true
- script:
name: Migrate DB
code: heroku run rake db:migrate --app $HEROKU_APP_NAME
- script:
name: Update assets
code: heroku run rake add_static_assets --app $HEROKU_APP_NAME
@nabinno
Copy link
Author

nabinno commented Jul 21, 2014

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