Class: KapostDeploy::Plugins::NotifyDatadogAfterPromote
- Inherits:
-
Object
- Object
- KapostDeploy::Plugins::NotifyDatadogAfterPromote
- Defined in:
- lib/kapost_deploy/plugins/notify_datadog_after_promote.rb
Overview
Notify Datadog (via seismograph) about deployments by:
- sending deployment timing
- logging an info event
Instance Method Summary collapse
- #after ⇒ Object
- #before ⇒ Object
-
#initialize(config, notifier: KapostDeploy::Seismograph::Notifier.new, ahead_releases: KapostDeploy::Heroku::AppReleases.new(config.app, token: config.heroku_api_token)) ⇒ NotifyDatadogAfterPromote
constructor
A new instance of NotifyDatadogAfterPromote.
Constructor Details
#initialize(config, notifier: KapostDeploy::Seismograph::Notifier.new, ahead_releases: KapostDeploy::Heroku::AppReleases.new(config.app, token: config.heroku_api_token)) ⇒ NotifyDatadogAfterPromote
Returns a new instance of NotifyDatadogAfterPromote.
11 12 13 14 15 16 17 |
# File 'lib/kapost_deploy/plugins/notify_datadog_after_promote.rb', line 11 def initialize(config, notifier: KapostDeploy::Seismograph::Notifier.new, ahead_releases: KapostDeploy::Heroku::AppReleases.new(config.app, token: config.heroku_api_token)) self.config = config self.notifier = notifier self.ahead_releases = ahead_releases end |
Instance Method Details
#after ⇒ Object
23 24 25 26 27 |
# File 'lib/kapost_deploy/plugins/notify_datadog_after_promote.rb', line 23 def after return unless start_time notify_datadog end |
#before ⇒ Object
19 20 21 |
# File 'lib/kapost_deploy/plugins/notify_datadog_after_promote.rb', line 19 def before @start_time = Time.now end |