Class: CircleciDeploymentNotifier::Build
- Inherits:
-
Object
- Object
- CircleciDeploymentNotifier::Build
- Defined in:
- lib/circleci_deployment_notifier/build.rb
Overview
The main object of this gem. Instantiated with the name of the application, can then be used to send a notification.
Instance Method Summary collapse
-
#initialize(app_name:) ⇒ Build
constructor
A new instance of Build.
-
#send_to_new_relic(new_relic_api_key:, new_relic_app_id:) ⇒ Object
Sends a deployment notification to New Relic.
-
#send_to_slack(webhook_url:) ⇒ Object
Sends a notification to Slack using the Slack Webhook URL.
Constructor Details
#initialize(app_name:) ⇒ Build
Returns a new instance of Build.
12 13 14 |
# File 'lib/circleci_deployment_notifier/build.rb', line 12 def initialize(app_name:) self.app_name = app_name end |
Instance Method Details
#send_to_new_relic(new_relic_api_key:, new_relic_app_id:) ⇒ Object
Sends a deployment notification to New Relic.
27 28 29 30 31 32 33 |
# File 'lib/circleci_deployment_notifier/build.rb', line 27 def send_to_new_relic(new_relic_api_key:, new_relic_app_id:) NewRelic.new( new_relic_api_key: new_relic_api_key, new_relic_app_id: new_relic_app_id, build_info: build_info, ).send end |