Skip to content

Instantly share code, notes, and snippets.

@benphelps
Created January 11, 2017 16:33
Show Gist options
  • Save benphelps/6c66c80732dbb26582bea15b91c3047e to your computer and use it in GitHub Desktop.
Save benphelps/6c66c80732dbb26582bea15b91c3047e to your computer and use it in GitHub Desktop.
A test / deploy setup I use
image: benphelps/docker-ruby-phantomjs:latest
Testing:
services:
- postgres:latest
variables:
POSTGRES_DB: test
POSTGRES_HOST: postgres
POSTGRES_USER: testuser
POSTGRES_PASS: testuser
environment: test
script:
- gem install bundler
- touch log/application.log
- touch log/test.log
- bundle install --jobs $(nproc) --path=/cache/bundler
- "RAILS_ENV=test rails db:drop db:create db:schema:load"
- bundle exec rspec
stage: test
tags:
- rails
Deploy to Staging:
only:
- deploy/staging
environment: staging
script: curl -X POST https://hooks.cloud66.com/stacks/redeploy/<key>
stage: deploy
tags:
- rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment