Module: Celerbrake::Capistrano
- Defined in:
- lib/celerbrake/capistrano/capistrano2.rb
Overview
The Capistrano v2 integration.
Class Method Summary collapse
-
.load_into(config) ⇒ Object
rubocop:disable Metrics/AbcSize.
Class Method Details
.load_into(config) ⇒ Object
rubocop:disable Metrics/AbcSize
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/celerbrake/capistrano/capistrano2.rb', line 7 def self.load_into(config) config.load do after 'deploy', 'celerbrake:deploy' after 'deploy:migrations', 'celerbrake:deploy' after 'deploy:cold', 'celerbrake:deploy' namespace :celerbrake do desc "Notify Celerbrake of the deploy" task :deploy, except: { no_release: true }, on_error: :continue do run( <<-CMD, once: true cd #{config.release_path} && \ RACK_ENV=#{fetch(:rack_env, nil)} \ RAILS_ENV=#{fetch(:rails_env, nil)} \ bundle exec rake celerbrake:deploy \ USERNAME=#{Shellwords.shellescape(ENV.fetch('USER', nil) || ENV.fetch('USERNAME', nil))} \ ENVIRONMENT=#{fetch(:celerbrake_env, fetch(:rails_env, 'production'))} \ REVISION=#{current_revision.strip} \ REPOSITORY=#{repository} \ VERSION=#{fetch(:app_version, nil)} CMD ) logger.info 'Notified Celerbrake of the deploy' end end end end |