az webapp deployment source
Note
此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 了解更多关于扩展的信息。
通过源代码管理来管理 Web 应用部署。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az webapp deployment source config |
从 git 或 Mercurial 存储库管理部署。 |
Core | GA |
az webapp deployment source config-local-git |
获取 git 存储库终结点的 URL 用于为 web 应用部署克隆和推送。 |
Core | GA |
az webapp deployment source config-zip |
使用 Web 应用的 kudu zip 推送部署执行部署。 |
Extension | GA |
az webapp deployment source delete |
删除源代码管理部署配置。 |
Core | GA |
az webapp deployment source show |
获取源代码管理部署配置的详细信息。 |
Core | GA |
az webapp deployment source sync |
从存储库同步。 仅在手动集成模式下需要。 |
Core | GA |
az webapp deployment source update-token |
更新 Azure 应用服务中缓存的源代码管理令牌。 |
Core | GA |
az webapp deployment source config
从 git 或 Mercurial 存储库管理部署。
请注意,GitHub 操作密码现在在结果中进行了修订。 请使用 az webapp deployment source show
命令查看 GitHub 操作密码。
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]
示例
从 git 或 Mercurial 存储库管理部署。 (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
必需参数
要从中拉取最新源的存储库 URL,例如 https://github.com/foo/foo-web。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
存储库的分支名称。
自动同步所需的 Git 访问令牌。
如果使用 GitHub作,则默认为 False。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
禁用源代码管理和 Web 之间的自动同步。
Web 应用的名称。 如果未指定,则会随机生成名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults web=<name>
。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
存储库类型。
属性 | 值 |
---|---|
默认值: | git |
接受的值: | externalgit, git, github, localgit, mercurial |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
槽的名称。 如果未指定,则默认为生产槽。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az webapp deployment source config-local-git
获取 git 存储库终结点的 URL 用于为 web 应用部署克隆和推送。
az webapp deployment source config-local-git [--ids]
[--name]
[--resource-group]
[--slot]
[--subscription]
示例
获取终结点并将其添加为 git 远程。
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
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Web 应用的名称。 如果未指定,则会随机生成名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults web=<name>
。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
槽的名称。 如果未指定,则默认为生产槽。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az webapp deployment source config-zip
使用 Web 应用的 kudu zip 推送部署执行部署。
默认情况下,Kudu 假定 zip 部署不需要任何与生成相关的操作,例如 npm 安装或 dotnet 发布。 若要启用 Kudu 检测逻辑并生成脚本生成过程,可以将 .deployment 文件包含在 zip 文件中,其内容为“[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true”。 请参阅 https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview。 或者,可以使用 az webapp config appsettings set 命令启用设置。
az webapp deployment source config-zip --src
[--ids]
[--is-kube]
[--name]
[--resource-group]
[--slot]
[--subscription]
[--timeout]
示例
使用 zip 文件内容执行部署。
az webapp deployment source config-zip \
-g {myRG} -n {myAppName} \
--src {zipFilePathLocation}
必需参数
用于部署的 zip 文件路径。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
该应用是 kubernetes 应用。
属性 | 值 |
---|---|
默认值: | False |
Web 应用的名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults web=<name>
。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
槽的名称。 如果未指定,则默认为生产槽。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
用于检查部署状态的可配置超时(以秒为单位)。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az webapp deployment source delete
删除源代码管理部署配置。
az webapp deployment source delete [--ids]
[--name]
[--resource-group]
[--slot]
[--subscription]
示例
删除源代码管理部署配置。 (autogenerated)
az webapp deployment source delete --name MyWebApp --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Web 应用的名称。 如果未指定,则会随机生成名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults web=<name>
。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
槽的名称。 如果未指定,则默认为生产槽。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az webapp deployment source show
获取源代码管理部署配置的详细信息。
az webapp deployment source show [--ids]
[--name]
[--resource-group]
[--slot]
[--subscription]
示例
获取源代码管理部署配置的详细信息。 (autogenerated)
az webapp deployment source show --name MyWebApp --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Web 应用的名称。 如果未指定,则会随机生成名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults web=<name>
。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
槽的名称。 如果未指定,则默认为生产槽。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az webapp deployment source sync
从存储库同步。 仅在手动集成模式下需要。
az webapp deployment source sync [--ids]
[--name]
[--resource-group]
[--slot]
[--subscription]
示例
从存储库同步。 仅在手动集成模式下需要。 (autogenerated)
az webapp deployment source sync --name MyWebapp --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Web 应用的名称。 如果未指定,则会随机生成名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults web=<name>
。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
槽的名称。 如果未指定,则默认为生产槽。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az webapp deployment source update-token
更新 Azure 应用服务中缓存的源代码管理令牌。
如果未提供令牌,该命令将清理现有令牌。 请注意,令牌现在在结果中进行了修订。
az webapp deployment source update-token [--git-token]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
自动同步所需的 Git 访问令牌。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |