{"id":107,"date":"2013-03-11T20:20:50","date_gmt":"2013-03-11T20:20:50","guid":{"rendered":"http:\/\/devopsny.com\/blog\/?p=107"},"modified":"2013-03-11T20:20:50","modified_gmt":"2013-03-11T20:20:50","slug":"automatically-update-new-relic-after-app-deployment","status":"publish","type":"post","link":"https:\/\/devopsny.com\/blog\/2013\/03\/11\/automatically-update-new-relic-after-app-deployment\/","title":{"rendered":"Automatically update New Relic after app deployment."},"content":{"rendered":"<p>I use TeamCity to build and deploy web applications. Using curl and an additional build step, I can update New Relic when the build is deployed to production.<\/p>\n<p>Add a Build Step of build runner type Command Line. The command and options are:<\/p>\n<p>curl -H &#8220;x-api-key:xxxxxxxxxxxxxxxx&#8221; -d &#8220;deployment[application_id]=xxxxxx&#8221; -d &#8220;deployment[host]=%system.agent.name%&#8221; -d &#8220;deployment[description]=This deployment was sent using curl.&#8221; -d &#8220;deployment[revision]=&#8221;%build.number%\u00a0<a title=\"Click to open this link in a new window\" href=\"https:\/\/rpm.newrelic.com\/deployments.xml\" target=\"_blank\">https:\/\/rpm.newrelic.com\/deployments.xml<\/a><\/p>\n<p>This will update New Relic with the build agent and build number.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use TeamCity to build and deploy web applications. Using curl and an additional build step, I can update New Relic when the build is deployed to production. Add a Build Step of build runner type Command Line. The command and options are: curl -H &#8220;x-api-key:xxxxxxxxxxxxxxxx&#8221; -d &#8220;deployment[application_id]=xxxxxx&#8221; -d &#8220;deployment[host]=%system.agent.name%&#8221; -d &#8220;deployment[description]=This deployment was sent [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[64,72,71],"tags":[75,76,74,73],"class_list":["post-107","post","type-post","status-publish","format-standard","hentry","category-devops","category-new-relic","category-teamcity","tag-build","tag-deploy","tag-newrelic","tag-teamcity-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3fcrv-1J","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/posts\/107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/comments?post=107"}],"version-history":[{"count":1,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/posts\/107\/revisions"}],"predecessor-version":[{"id":108,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/posts\/107\/revisions\/108"}],"wp:attachment":[{"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/media?parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/categories?post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devopsny.com\/blog\/wp-json\/wp\/v2\/tags?post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}