-
-
Save wilsontayar/7784690 to your computer and use it in GitHub Desktop.
Fast way to send a deploy to New Relic using PowerShell. Just throw curl (http://curl.haxx.se/download.html) inside your %WINDIR%\system32 folder and [C:\newRelicDeploy.ps1 -User "John Doe" -Revision "v.6.6.6.0" -Changelog "list of changes in this version"].
This file contains 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
param([String] $User, [String] $Revision, [String] $Description, [String] $Changelog) | |
$appID = "<your app id here>" | |
$apiKey = "<your api key here>" | |
"Sending deploy to New Relic API..." | |
$command = "curl -k -H 'x-api-key:$apiKey' -d 'deployment[application_id]=$appID' -d '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
New revision using curl. Just found it way easier than using System.Net.HttpWebRequest.
Anyway, you could always gitbash the curl as well. This is just a "parameterized" way of doing it. :)