Last active
April 25, 2018 18:50
-
-
Save gpsarkar/5da3dcf384b798db01e15313a40aa67a to your computer and use it in GitHub Desktop.
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
$webhook = "SLACK INCOMING WEBHOOK URL" | |
$attachments = @(@{ | |
"pretext" = "Lab 7 Smoke Test" | |
"color"="danger" | |
"text"= "14/43 failed (5 mins)" | |
}) | |
$payload = | |
@{ | |
"attachments" = $attachments | |
} | |
Invoke-WebRequest ` | |
-Body (ConvertTo-Json -Compress -InputObject $payload) ` | |
-Method Post ` | |
-UseBasicParsing ` | |
-Uri $webhook | Out-Null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment