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 653
Deployment branch
Adrian Calinescu edited this page Sep 19, 2016
·
8 revisions
By default, only pushes to the 'master' branch get deployed. But you can change this by calling a REST API on the Kudu service. One simple way to do this is to use curl.
Here is an example:
# Switch branch (/settings endpoint)
$ curl -H "Content-Type: application/json; charset=UTF-8" \
--data "{key: 'branch', value: 'anotherbranch' }" \
https://user:[email protected]/settings
$ cat body.json
{
"format": "basic",
"url": "https:/username/projectname"
}
# Trigger a deployment (branch name is read from /settings)
$ curl -X POST https://user:[email protected]/deploy \
--data @body.json \
-H "Content-type: application/json"
Which results in:
The Azure portal (portal.azure.com) also has UI to change this:
Deployment options blade -> Disconnect -> Setup -> Choose branch.