Sha256: 95b6d0bfde17658dca2bf15532f591efc3a3ea61e742a3f5fb90cb72b31d4999
Contents?: true
Size: 1.25 KB
Versions: 11
Compression:
Stored size: 1.25 KB
Contents
require 'errplane' Capistrano::Configuration.instance(:must_exist).load do after 'deploy', 'deploy:notify_errplane' after 'deploy:migrations', 'deploy:notify_errplane' namespace :deploy do desc 'Notify Errplane of the deployment' task :notify_errplane, :except => {:no_release => true} do set(:deploying_user) { `whoami`.strip } set(:deploying_user_name) { `bash -c 'git config --get user.name'`.strip } set(:deploying_user_email) { `bash -c 'git config --get user.email'`.strip } puts "Notifying Errplane of the deployment.." framework_env = fetch(:errplane_env, fetch(:rails_env, 'production')) load File.join(Dir.pwd, "config/initializers/errplane.rb") Errplane.configuration.logger = Logger.new("/dev/null") Errplane.configuration.environment = framework_env context = { :environment => framework_env, :revision => current_revision, :repository => repository, :branch => (branch rescue nil), :scm => scm, :remote_user => (user rescue nil), :local_user => deploying_user, :scm_user_name => deploying_user_name, :scm_user_email => deploying_user_email } Errplane.report_deployment(context) end end end
Version data entries
11 entries across 11 versions & 1 rubygems