class DeployDply::Newrelic
Attributes
helper[W]
Public Instance Methods
record_deployment(dry_run: false)
click to toggle source
# File lib/deploy_dply/newrelic.rb, line 6 def record_deployment(dry_run: false) return if not File.exist? "config/newrelic.yml" name = File.read("ARCHIVE_NAME").chomp rescue "unknown" revision = File.read("REVISION").chomp rescue "unknown" commit_id = File.read("GIT_COMMIT_ID") rescue "unknown" description = "revision #{revision}: #{commit_id}" changelog = "https://ci.mxplay.com/job/#{name}/#{revision}/changes" command = %{echo "#{changelog}" | bundle exec newrelic deployments -u "jenkins" -r "#{revision}" -e production -c "#{description}" } if dry_run puts command else helper.sh command end end
Private Instance Methods
helper()
click to toggle source
# File lib/deploy_dply/newrelic.rb, line 25 def helper @helper ||= Helper.new end