az webapp deployment source

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Manage web app deployment via source control.

Commands

Name Description Type Status
az webapp deployment source config

Manage deployment from git or Mercurial repositories.

Core GA
az webapp deployment source config-local-git

Get a URL for a git repository endpoint to clone and push to for web app deployment.

Core GA
az webapp deployment source config-zip

Perform deployment using the kudu zip push deployment for a web app.

Core GA
az webapp deployment source config-zip (appservice-kube extension)

Perform deployment using the kudu zip push deployment for a web app.

Extension GA
az webapp deployment source delete

Delete a source control deployment configuration.

Core GA
az webapp deployment source show

Get the details of a source control deployment configuration.

Core GA
az webapp deployment source sync

Synchronize from the repository. Only needed under manual integration mode.

Core GA
az webapp deployment source update-token

Update source control token cached in Azure app service.

Core GA

az webapp deployment source config

Manage deployment from git or Mercurial repositories.

Note that the GitHub action password is now redacted in the result. Please use the az webapp deployment source show command to view the GitHub action password.

az webapp deployment source config --repo-url
                                   [--branch]
                                   [--git-token]
                                   [--github-action]
                                   [--ids]
                                   [--manual-integration]
                                   [--name]
                                   [--repository-type {externalgit, git, github, localgit, mercurial}]
                                   [--resource-group]
                                   [--slot]
                                   [--subscription]

Examples

Manage deployment from git or Mercurial repositories. (autogenerated)

az webapp deployment source config --branch master --manual-integration --name MyWebApp --repo-url https://github.com/Azure-Samples/function-image-upload-resize --resource-group MyResourceGroup

Required Parameters

--repo-url -u

Repository url to pull the latest source from, e.g. https://github.com/foo/foo-web.

Optional Parameters

--branch

The branch name of the repository.

--git-token

Git access token required for auto sync.

--github-action

If using GitHub action, default to False.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--manual-integration

Disable automatic sync between source control and web.

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--repository-type

Repository type.

accepted values: externalgit, git, github, localgit, mercurial
default value: git
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp deployment source config-local-git

Get a URL for a git repository endpoint to clone and push to for web app deployment.

az webapp deployment source config-local-git [--ids]
                                             [--name]
                                             [--resource-group]
                                             [--slot]
                                             [--subscription]

Examples

Get an endpoint and add it as a git remote.

az webapp deployment source config-local-git \
    -g MyResourceGroup -n MyUniqueApp

git remote add azure \
    https://{deploy_user_name}@MyUniqueApp.scm.azurewebsites.net/MyUniqueApp.git

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp deployment source config-zip

Perform deployment using the kudu zip push deployment for a web app.

By default Kudu assumes that zip deployments do not require any build-related actions like npm install or dotnet publish. This can be overridden by including a .deployment file in your zip file with the following content '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true', to enable Kudu detection logic and build script generation process. See https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview. Alternately the setting can be enabled using the az webapp config appsettings set command.

az webapp deployment source config-zip --src
                                       [--ids]
                                       [--name]
                                       [--resource-group]
                                       [--slot]
                                       [--subscription]
                                       [--timeout]
                                       [--track-status {false, true}]

Examples

Perform deployment by using zip file content.

az webapp deployment source config-zip \
    -g {myRG} -n {myAppName} \
    --src {zipFilePathLocation}

Required Parameters

--src

A zip file path for deployment.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout -t

Configurable timeout in seconds for checking the status of deployment.

--track-status

If true, web app startup status during deployment will be tracked for linux web apps.

accepted values: false, true
default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp deployment source config-zip (appservice-kube extension)

Perform deployment using the kudu zip push deployment for a web app.

By default Kudu assumes that zip deployments do not require any build-related actions like npm install or dotnet publish. This can be overridden by including a .deployment file in your zip file with the following content '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true', to enable Kudu detection logic and build script generation process. See https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview. Alternately the setting can be enabled using the az webapp config appsettings set command.

az webapp deployment source config-zip --src
                                       [--ids]
                                       [--is-kube]
                                       [--name]
                                       [--resource-group]
                                       [--slot]
                                       [--subscription]
                                       [--timeout]

Examples

Perform deployment by using zip file content.

az webapp deployment source config-zip \
    -g {myRG} -n {myAppName} \
    --src {zipFilePathLocation}

Required Parameters

--src

A zip file path for deployment.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--is-kube

The app is a kubernetes app.

default value: False
--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout -t

Configurable timeout in seconds for checking the status of deployment.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp deployment source delete

Delete a source control deployment configuration.

az webapp deployment source delete [--ids]
                                   [--name]
                                   [--resource-group]
                                   [--slot]
                                   [--subscription]

Examples

Delete a source control deployment configuration. (autogenerated)

az webapp deployment source delete --name MyWebApp --resource-group MyResourceGroup

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp deployment source show

Get the details of a source control deployment configuration.

az webapp deployment source show [--ids]
                                 [--name]
                                 [--resource-group]
                                 [--slot]
                                 [--subscription]

Examples

Get the details of a source control deployment configuration. (autogenerated)

az webapp deployment source show --name MyWebApp --resource-group MyResourceGroup

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp deployment source sync

Synchronize from the repository. Only needed under manual integration mode.

az webapp deployment source sync [--ids]
                                 [--name]
                                 [--resource-group]
                                 [--slot]
                                 [--subscription]

Examples

Synchronize from the repository. Only needed under manual integration mode. (autogenerated)

az webapp deployment source sync --name MyWebapp --resource-group MyResourceGroup

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp deployment source update-token

Update source control token cached in Azure app service.

If no token is provided, the command will clean up existing token. Note that tokens are now redacted in the result.

az webapp deployment source update-token [--git-token]

Optional Parameters

--git-token

Git access token required for auto sync.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.