This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 655
Manually triggering a deployment
Adrian Calinescu edited this page Apr 11, 2016
·
13 revisions
Here's how to trigger a (fetch) deployment from an external git repository.
e.g. You have a git repository at https://example.com/git/RepositoryName.git and you'd like to notify Kudu to trigger a deployment for every new commit.
POST /deploy HTTP/1.1
Host: $SiteLevelUsername:SiteLevelPassword@<SiteName>.scm.azurewebsites.net
Content-Type: application/json
Accept: application/json
X-SITE-DEPLOYMENT-ID: <SiteName>
Transfer-encoding: chunked
{
"format":"basic",
"url":"https://username:password@example.com/git/RepositoryName.git"
}
For Mercurial (hg) add "is_hg": true
to the JSON payload.
In addition to the POST above you can accomplish the same thing by invoking the following cmdlet:
# Action sync
Invoke-AzureRmResourceAction -ResourceGroupName <ResourceGroupName> `
-ResourceType Microsoft.Web/sites `
-ResourceName <WebAppName> `
-Action sync `
-ApiVersion 2015-08-01 `
-Force -Verbose
GitHub specific guide here: https://github.com/projectkudu/kudu/wiki/Deploying-from-github