update deploy.rb.sample
This commit is contained in:
parent
e471c135d2
commit
17cbeb3d7f
|
@ -10,7 +10,6 @@ set :default_environment, {
|
|||
|
||||
require 'rvm/capistrano'
|
||||
require 'bundler/capistrano'
|
||||
require 'airbrake/capistrano'
|
||||
|
||||
set :whenever_command, "bundle exec whenever"
|
||||
# require "whenever/capistrano"
|
||||
|
@ -86,6 +85,7 @@ after "deploy:start", "resque:start"
|
|||
after "deploy:restart", "resque:restart"
|
||||
|
||||
after "deploy:restart", "deploy:cleanup"
|
||||
after :deploy, 'notify_rollbar'
|
||||
|
||||
namespace :rake_tasks do
|
||||
Cape do
|
||||
|
@ -93,6 +93,14 @@ namespace :rake_tasks do
|
|||
end
|
||||
end
|
||||
|
||||
task :notify_rollbar, :roles => :app do
|
||||
set :revision, `git log -n 1 --pretty=format:"%H"`
|
||||
set :local_user, `whoami`
|
||||
set :rollbar_token, 'rollbar_token'
|
||||
rails_env = fetch(:rails_env, 'production')
|
||||
run "curl https://api.rollbar.com/api/1/deploy/ -F access_token=#{rollbar_token} -F environment=#{rails_env} -F revision=#{revision} -F local_username=#{local_user} >/dev/null 2>&1", :once => true
|
||||
end
|
||||
|
||||
namespace :update do
|
||||
desc "Copy remote production shared files to localhost"
|
||||
task :shared do
|
||||
|
|
Loading…
Reference in New Issue