Skip to content

Commit

Permalink
issue 51: updated newrelic.sh to use APIv2
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hoffman committed Dec 18, 2017
1 parent a56ebc7 commit 3ebf6a6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion samples/newrelic/newrelic.sh
Expand Up @@ -13,4 +13,16 @@ repotype=$6 # The version control system your site is using; "git" or "svn".
#Load the New Relic APPID and APPKEY variables.
. $HOME/newrelic_settings

curl -s -H "x-api-key:$APIKEY" -d "deployment[application_id]=$APPID" -d "deployment[host]=localhost" -d "deployment[description]=$deployedtag deployed to $site:$targetenv" -d "deployment[revision]=$deployedtag" -d "deployment[changelog]=$deployedtag deployed to $site:$targetenv" -d "deployment[user]=$username" https://api.newrelic.com/deployments.xml
#https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/recording-deployments#post-deployment
curl -X POST 'https://api.newrelic.com/v2/applications/$APPID/deployments.json' \
-H 'X-Api-Key:$APIKEY' -i \
-H 'Content-Type: application/json' \
-d \
'{
"deployment": {
"revision": "$deployedtag",
"changelog": "$deployedtag deployed to $site:$targetenv",
"description": "$deployedtag deployed to $site:$targetenv",
"user": "$username"
}
}'

0 comments on commit 3ebf6a6

Please sign in to comment.