Sha256: 4b3a0e71fc00dcffc9f3f443c4b1dbf5cdb3f2ee3394cafc90defe9609b2ae10
Contents?: true
Size: 1.19 KB
Versions: 48
Compression:
Stored size: 1.19 KB
Contents
namespace :appsignal do task :deploy do appsignal_env = fetch(:appsignal_env, fetch(:stage, fetch(:rails_env, fetch(:rack_env, "production")))) user = fetch(:appsignal_user, ENV["USER"] || ENV["USERNAME"]) revision = fetch(:appsignal_revision, fetch(:current_revision)) appsignal_config = Appsignal::Config.new( Dir.pwd, appsignal_env, {}, Logger.new(StringIO.new) ).tap do |c| fetch(:appsignal_config, {}).each do |key, value| c[key] = value end c.validate end 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
48 entries across 48 versions & 1 rubygems