Skip to content

Instantly share code, notes, and snippets.

@rodolfofadino
Created August 21, 2014 19:09
Show Gist options
  • Save rodolfofadino/81e188e3bcd8fa3ee501 to your computer and use it in GitHub Desktop.
Save rodolfofadino/81e188e3bcd8fa3ee501 to your computer and use it in GitHub Desktop.
Tag Deploy on NewRelic
##usage: newrelicdeploy.ps1 -User Rodolfo -Revision RevisionName -Description Description -Changelog Changes
param([String] $User, [String] $Revision, [String] $Description, [String] $Changelog)
[console]::OutputEncoding = [text.encoding]::UTF8
$appID = "APPID"
$apiKey = "APIKEY"
"Sending deploy to New Relic API..."
$command = "curl -k -H 'x-api-key:$apiKey' -d 'deployment[application_id]=$appID' --data-urlencode 'deployment[description]=$Description' -d 'deployment[revision]=$Revision' -d 'deployment[changelog]=$Changelog' -d 'deployment[user]=$User' https://api.newrelic.com/deployments.xml"
Invoke-Expression $command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment