Created
January 11, 2017 16:33
-
-
Save benphelps/6c66c80732dbb26582bea15b91c3047e to your computer and use it in GitHub Desktop.
A test / deploy setup I use
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
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