Created
April 2, 2024 23:13
-
-
Save RylandDeGregory/175ac850392992509e0f3cc8abfa90f2 to your computer and use it in GitHub Desktop.
Invoke Azure App Service Web App for Containers CI/CD webhook for docker container image re-pull/version update.
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
# https://learn.microsoft.com/en-us/azure/app-service/deploy-ci-cd-custom-container?tabs=private&pivots=container-linux#4-enable-cicd | |
$WebhookURL = '' | |
$Username = $WebhookURL.Split('https://').Split(':')[1].Split('@')[0] | |
$Password = $WebhookURL.Split('https://').Split(':')[2].Split('@')[0] | |
$Headers = @{ 'Authorization' = "Basic $([Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$Username`:$Password")))" } | |
Invoke-RestMethod -Method Post -Uri "https://$($WebhookURL.Split('@')[1])" -Headers $Headers -UserAgent 'powershell/1.0' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment