# .travis.yml
language: ruby
rvm:
- 2.2.3
before_script:
- psql -c 'create database "yacs-test";' -U postgresIn your project...
In your settings...
Travis-CI + Github makes this very easy with pre-build integrations
Travis uses helpful sane defaults, simplifying config
Pull Request
Automated Testing
Deploy to Staging
Acceptance Testing
Deploy to Production
Auto
Auto
Auto
Manual
With a little creativity, we can make a simple Github integration
We're using the same system as Heroku's auto-deploy and Slack's notifications
Github will POST to the provided address whenever a branch is updated
# deploy_server.rb
require 'sinatra'
post '/deploy' do
if verify_webhook(request: request, secret: 'GET CREATIVE')
system('sh ../app/deploy.sh')
end
end
# deploy.sh
puma_ctl stop
git pull
mkdir -p ./tmp/pids/puma
bundle exec rake db:create db:migrate
bundle exec rake assets:precompile
puma_ctl startPull Request
Automated Testing
Deploy to Staging
Acceptance Testing
Deploy to Production
git checkout staging
ruby deploy_server.rb &Staging Server
git checkout master
ruby deploy_server.rb &Production Server
Auto
Auto
Auto
Auto
The only manual action is the merging of the pull requests
Dr. Krishnamoorthy
Dr. Goldschmidt
Dr. Turner
Red Hat
Sean O'Sullivan
Our Mentors!
The YACS team!
DigitalOcean
Heroku
Github
Docker
Travis-CI
Agile Alliance