Sha256: fccf81d793d68a827ace51f40f6249fd72dc3be2fd8e886347f064c4ea045e55
Contents?: true
Size: 1.26 KB
Versions: 8
Compression:
Stored size: 1.26 KB
Contents
module Bugsnag module Capistrano def self.load_into(configuration) configuration.load do after "deploy", "bugsnag:deploy" after "deploy:migrations", "bugsnag:deploy" namespace :bugsnag do desc "Notify Bugsnag that new production code has been deployed" task :deploy, :except => { :no_release => true }, :on_error => :continue do begin Bugsnag::Deploy.notify({ :api_key => fetch(:bugsnag_api_key, ENV["BUGSNAG_API_KEY"]), :release_stage => ENV["BUGSNAG_RELEASE_STAGE"] || fetch(:rails_env, "production"), :revision => fetch(:current_revision, ENV["BUGSNAG_REVISION"]), :repository => fetch(:repository, ENV["BUGSNAG_REPOSITORY"]), :branch => fetch(:branch, ENV["BUGSNAG_BRANCH"], :app_version => fetch(:app_version, ENV["BUGSNAG_APP_VERSION"])) }) rescue logger.important("Bugsnag deploy notification failed, #{$!.inspect}") end logger.info "Bugsnag deploy notification complete." end end end end end end Bugsnag::Capistrano.load_into(Capistrano::Configuration.instance) if Capistrano::Configuration.instance
Version data entries
8 entries across 8 versions & 1 rubygems