class Object

Public Instance Methods

create_bigpanda_client() click to toggle source
# File lib/bigpanda/capistrano.rb, line 72
def create_bigpanda_client
  BigPanda::Client.new(:access_token => fetch(:bigpanda_access_token, nil), :target_url => fetch(:bigpanda_target_url, "https://api.bigpanda.io"))
end
send_deployment_end(status, properties = {}) click to toggle source

Map capistrano execution variables to BigPanda Fields for deployment end

Parameters:

optional Hash which can contain all proprietary fields
# File lib/bigpanda/capistrano.rb, line 55
def send_deployment_end(status, properties = {})
  panda = create_bigpanda_client

  errorMessage = properties.delete(:errorMessage)

  panda.deployment_end({ :component => application,
                         :version => "#{fetch(:branch, '')} #{release_name}",
                         :hosts => find_servers_for_task(current_task),
                         :status => status,
                         :env => rails_env,
                         :errorMessage => errorMessage,
                         :properties => properties})
rescue Exception => e
  logger.important "err :: while sending BigPanda start, Skipping to next command. #{e.message}"
end
send_deployment_start(properties = {}) click to toggle source

Map capistrano execution variables to BigPanda Fields for deployment start

Parameters:

optional Hash which can contain all proprietary fields
# File lib/bigpanda/capistrano.rb, line 35
def send_deployment_start(properties = {})
  panda = create_bigpanda_client

  panda.deployment_start({:component => application,
                          :version => "#{fetch(:branch, '')} #{release_name}",
                          :hosts => find_servers_for_task(current_task),
                          :env => rails_env,
                          :owner => fetch(:bigpanda_owner, nil),
                          :properties => properties,
                          :source_system => "capistrano"
                          })
rescue Exception => e
  logger.important "err :: while sending BigPanda start, Skipping to next command. #{e.message}"
end