Skip to content

Instantly share code, notes, and snippets.

@tsnow
Last active August 29, 2015 13:56
Show Gist options
  • Save tsnow/9283680 to your computer and use it in GitHub Desktop.
Save tsnow/9283680 to your computer and use it in GitHub Desktop.
Testing Capistrano deploys on Travis
before_install:
- ssh-keygen -t rsa -f ~/.ssh/id_rsa_2 -P ""
- touch ~/.ssh/authorized_keys
- cat ~/.ssh/id_rsa_2.pub >> ~/.ssh/authorized_keys
- eval `ssh-agent`
- ssh-add ~/.ssh/id_rsa_2
cache: bundler
language: ruby
script:
- bundle exec rake # you'll want capistrano-spec
- bundle exec cap deploy:setup deploy
load 'deploy'
role :web, "localhost"
role :app, "localhost", :primary => true
role :db, "localhost"
set :branch, "master"
set :rails_env, 'test'
set :application, "app_name"
set :user, ENV['USER']
set :deploy_to, File.expand_path('../../../spec/fixtures/deploy', __FILE__)
set :repository,"[email protected]:ridecharge/devops-tools.git"
namespace :deploy do
task :restart do
run "echo Deployed"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment