Module: SendDeployment

Defined in:
lib/new_relic/recipes/helpers/send_deployment.rb

Overview

This file is distributed under New Relic’s license terms. See github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. frozen_string_literal: true

Instance Method Summary collapse

Instance Method Details

#send_deployment_notification_to_newrelicObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/new_relic/recipes/helpers/send_deployment.rb', line 6

def send_deployment_notification_to_newrelic
  require 'new_relic/cli/command'
  debug('Uploading deployment to New Relic')
  NewRelic::Cli::Deployments.new(deploy_options).run
  info('Uploaded deployment information to New Relic')
rescue NewRelic::Cli::Command::CommandFailure => e
  info(e.message)
rescue => e
  info("Error creating New Relic deployment (#{e})\n#{e.backtrace.join("\n")}")
end