Sha256: 256ffdc68de5452bc87b0960e874ac3f2a1efccbe0bbd01d54f7a68fb92b1584
Contents?: true
Size: 1.14 KB
Versions: 28
Compression:
Stored size: 1.14 KB
Contents
namespace :load do task :defaults do set :bugsnag_default_hooks, ->{ true } end end namespace :deploy do before :starting, :bugsnag_hooks do invoke 'bugsnag:add_default_hooks' if fetch(:bugsnag_default_hooks) end end namespace :bugsnag do task :add_default_hooks do after 'deploy:published', 'bugsnag:deploy' end desc 'Notify Bugsnag that new production code has been deployed' task :deploy do run_locally do begin Bugsnag::Deploy.notify({ :api_key => fetch(:bugsnag_api_key, ENV["BUGSNAG_API_KEY"]), :release_stage => fetch(:bugsnag_env) || fetch(:rails_env) || fetch(:stage) || ENV["BUGSNAG_RELEASE_STAGE"] || "production", :revision => fetch(:current_revision, ENV["BUGSNAG_REVISION"]), :repository => fetch(:repo_url, ENV["BUGSNAG_REPOSITORY"]), :branch => fetch(:branch, ENV["BUGSNAG_BRANCH"]), :app_version => fetch(:app_version, ENV["BUGSNAG_APP_VERSION"]) }) rescue error "Bugsnag deploy notification failed, #{$!.inspect}" end info 'Bugsnag deploy notification complete.' end end end # vi:ft=ruby
Version data entries
28 entries across 28 versions & 1 rubygems