Class: CircleciDeploymentNotifier::NewRelic

Inherits:
Object
  • Object
show all
Defined in:
lib/circleci_deployment_notifier/new_relic.rb

Overview

Sends deployment notification to New Relic. Builds the message using a BuildInfo object.

Instance Method Summary collapse

Constructor Details

#initialize(new_relic_api_key:, new_relic_app_id:, build_info:) ⇒ NewRelic



14
15
16
17
18
# File 'lib/circleci_deployment_notifier/new_relic.rb', line 14

def initialize(new_relic_api_key:, new_relic_app_id:, build_info:)
  self.new_relic_api_key = new_relic_api_key
  self.new_relic_app_id = new_relic_app_id
  self.build_info = build_info
end

Instance Method Details

#sendBoolean

Sends the deployment notification to New Relic.



23
24
25
# File 'lib/circleci_deployment_notifier/new_relic.rb', line 23

def send
  http_response.code == 201
end