Created
August 21, 2014 19:09
-
-
Save rodolfofadino/81e188e3bcd8fa3ee501 to your computer and use it in GitHub Desktop.
Tag Deploy on 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
##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