你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az functionapp deployment source

Note

此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 Learn more about extensions.

通过源代码管理管理函数应用部署。

命令

名称 说明 类型 Status
az functionapp deployment source config

从 git 或 Mercurial 存储库管理部署。

Core GA
az functionapp deployment source config-local-git

获取 Git 存储库终结点的 URL,以便克隆并推送到函数应用部署。

Core GA
az functionapp deployment source config-zip

使用函数应用的 kudu zip 推送部署执行部署。

Core GA
az functionapp deployment source config-zip (appservice-kube 扩展)

使用函数应用的 kudu zip 推送部署执行部署。

Extension GA
az functionapp deployment source delete

删除源代码管理部署配置。

Core GA
az functionapp deployment source show

获取源代码管理部署配置的详细信息。

Core GA
az functionapp deployment source sync

从存储库同步。 仅在手动集成模式下需要。

Core GA
az functionapp deployment source update-token

更新 Azure 应用服务中缓存的源代码管理令牌。

Core GA

az functionapp deployment source config

从 git 或 Mercurial 存储库管理部署。

请注意,GitHub 操作密码现在在结果中进行了修订。 请使用 az functionapp deployment source show 命令查看 GitHub 操作密码。

az functionapp 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 functionapp deployment source config --branch master --manual-integration --name MyFunctionApp --repo-url https://github.com/Azure-Samples/function-image-upload-resize --resource-group MyResourceGroup

必需参数

--repo-url -u

要从中拉取最新源的存储库 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.

--branch

存储库的分支名称。

--git-token

自动同步所需的 Git 访问令牌。

--github-action

如果使用 GitHub作,则默认为 False。

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--manual-integration

禁用源代码管理和 Web 之间的自动同步。

--name -n

函数应用的名称。

属性
Parameter group: Resource Id Arguments
--repository-type

Repository type.

属性
默认值: git
接受的值: externalgit, git, github, localgit, mercurial
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az functionapp deployment source config-local-git

获取 Git 存储库终结点的 URL,以便克隆并推送到函数应用部署。

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

示例

获取终结点并将其添加为 git 远程。

az functionapp 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.

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name -n

函数应用的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az functionapp deployment source config-zip

使用函数应用的 kudu zip 推送部署执行部署。

默认情况下,Kudu 假定 zip 部署不需要任何与生成相关的操作,例如 npm 安装或 dotnet 发布。 若要启用 Kudu 检测逻辑并生成脚本生成过程,可以在 zip 文件中包含以下内容“[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true”来重写此文件。 请参阅 https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview。 或者,可以使用 az functionapp config appsettings set 命令启用设置。

az functionapp deployment source config-zip --src
                                            [--build-remote {false, true}]
                                            [--ids]
                                            [--name]
                                            [--resource-group]
                                            [--slot]
                                            [--subscription]
                                            [--timeout]

示例

使用 zip 文件内容执行部署。

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

必需参数

--src

用于部署的 zip 文件路径。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--build-remote

在部署期间启用远程生成。

属性
接受的值: false, true
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name -n

函数应用的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
--timeout -t

用于检查部署状态的可配置超时(以秒为单位)。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az functionapp deployment source config-zip (appservice-kube 扩展)

使用函数应用的 kudu zip 推送部署执行部署。

默认情况下,Kudu 假定 zip 部署不需要任何与生成相关的操作,例如 npm 安装或 dotnet 发布。 若要启用 Kudu 检测逻辑并生成脚本生成过程,可以在 zip 文件中包含以下内容“[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true”来重写此文件。 请参阅 https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview。 或者,可以使用 az functionapp config appsettings set 命令启用设置。

az functionapp deployment source config-zip --src
                                            [--build-remote {false, true}]
                                            [--ids]
                                            [--name]
                                            [--resource-group]
                                            [--slot]
                                            [--subscription]
                                            [--timeout]

示例

使用 zip 文件内容执行部署。

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

必需参数

--src

用于部署的 zip 文件路径。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--build-remote

在部署期间启用远程生成。

属性
默认值: False
接受的值: false, true
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name -n

函数应用的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
--timeout -t

用于检查部署状态的可配置超时(以秒为单位)。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az functionapp deployment source delete

删除源代码管理部署配置。

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

示例

删除源代码管理部署配置。 (autogenerated)

az functionapp deployment source delete --name MyFunctionApp --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.

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name -n

函数应用的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az functionapp deployment source show

获取源代码管理部署配置的详细信息。

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

示例

获取源代码管理部署配置的详细信息。 (autogenerated)

az functionapp deployment source show --name MyFunctionApp --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.

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name -n

函数应用的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az functionapp deployment source sync

从存储库同步。 仅在手动集成模式下需要。

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

示例

从存储库同步。 仅在手动集成模式下需要。 (autogenerated)

az functionapp deployment source sync --name MyFunctionApp --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.

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name -n

函数应用的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

属性
Parameter group: Resource Id Arguments
--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

属性
Parameter group: Resource Id Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az functionapp deployment source update-token

更新 Azure 应用服务中缓存的源代码管理令牌。

如果未提供令牌,该命令将清理现有令牌。 请注意,令牌现在在结果中进行了修订。

az functionapp 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-token

自动同步所需的 Git 访问令牌。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False