Last active
July 22, 2018 23:53
-
-
Save Dalmirog-zz/4b45994a2c5f782fd0b4 to your computer and use it in GitHub Desktop.
Block Octopus Release
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
$apiKey = "Your API Key" | |
$OctopusURL = "Your Octopus URL" | |
$Header = @{ "X-Octopus-ApiKey" = $apiKey } | |
#Release you want to block | |
$ReleaseID = "Your Release ID" #i.e. releases-2610 | |
$body = @{description="This is the description for the blocking"} | ConvertTo-Json | |
Invoke-WebRequest -Uri "$OctopusURL/api/releases/$ReleaseID/defects" -Method Post -Headers $Header -Body $body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this fragment.