Sha256: bc78a1050083af626b59aa2ead67ec5b492f2528c4ef6a46e4467392ac1a4b92
Contents?: true
Size: 1.07 KB
Versions: 6
Compression:
Stored size: 1.07 KB
Contents
namespace :appsignal do task :deploy do appsignal_env = fetch(:appsignal_env, fetch(:stage, fetch(:rails_env, fetch(:rack_env, "production")))) user = ENV["USER"] || ENV["USERNAME"] revision = fetch(:appsignal_revision, fetch(:current_revision)) appsignal_config = Appsignal::Config.new( ENV["PWD"], appsignal_env, fetch(:appsignal_config, {}), Logger.new(StringIO.new) ) if appsignal_config && appsignal_config.active? marker_data = { :revision => revision, :user => user } marker = Appsignal::Marker.new(marker_data, appsignal_config) # {#dry_run?} helper was added in Capistrano 3.5.0 # https://github.com/capistrano/capistrano/commit/38d8d6d2c8485f1b5643857465b16ff01da57aff if respond_to?(:dry_run?) && dry_run? puts "Dry run: AppSignal deploy marker not actually sent." else marker.transmit end else puts "Not notifying of deploy, config is not active for environment: #{appsignal_env}" end end end after "deploy:finished", "appsignal:deploy"
Version data entries
6 entries across 6 versions & 1 rubygems