Created
April 29, 2014 14:31
-
-
Save rpunt/11402142 to your computer and use it in GitHub Desktop.
Post deployment info the NewRelic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# New Relic deployment events | |
my $ua = LWP::UserAgent->new; | |
$response = $ua->request(POST 'https://api.newrelic.com/deployments.xml', | |
Content => [ | |
'deployment[application_id]' => $APPID, | |
'deployment[description]' => 'deployment message', | |
'deployment[revision]' => $RELEASE_VERSION, | |
'deployment[user]' => 'Jenkins' | |
], | |
'x-api-key' => $APIKEY | |
); | |
if ($response->is_success) { | |
print $response->decoded_content; | |
} else { | |
print $response->headers_as_string . "\n"; | |
die $response->status_line; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment