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

az functionapp devops-pipeline

备注

此参考是 Azure CLI (2.0.46 或更高版本) 的 functionapp 扩展的一部分。 首次运行 az functionapp devops-pipeline 命令时,该扩展将自动安装。 详细了解扩展。

特定于 Azure Function 与 Azure DevOps 的集成。 有关详细信息,请访问 https://aka.ms/functions-azure-devops

命令

az functionapp devops-pipeline create

为函数应用创建 Azure DevOps 管道。

az functionapp devops-pipeline create

为函数应用创建 Azure DevOps 管道。

az functionapp devops-pipeline create [--allow-force-push {false, true}]
                                      [--functionapp-name]
                                      [--github-pat]
                                      [--github-repository]
                                      [--organization-name]
                                      [--overwrite-yaml {false, true}]
                                      [--project-name]
                                      [--repository-name]

示例

创建 Azure Pipeline 到函数应用。

az functionapp devops-pipeline create --functionapp-name FunctionApp

从 Github 函数应用存储库创建 Azure Pipeline。

az functionapp devops-pipeline create --github-repository GithubOrganization/GithubRepository --github-pat GithubPersonalAccessToken

使用特定的 Azure DevOps 组织和项目创建 Azure Pipeline

az functionapp devops-pipeline create --organization-name AzureDevOpsOrganization --project-name AzureDevOpsProject

可选参数

--allow-force-push

如果 Azure DevOps 存储库不干净,它是否应覆盖远程内容?

接受的值: false, true
--functionapp-name

要使用的 Azure 函数应用的名称。

--github-pat

用于从 Github 存储库创建管道的 Github 个人访问令牌。

--github-repository

Github 存储库的完整名称 (,例如 Azure/azure-cli) 。

--organization-name

要使用的 Azure DevOps 组织的名称。

--overwrite-yaml

如果你有现有的 yaml,应该覆盖它吗?

接受的值: false, true
--project-name

要使用的 Azure DevOps 项目的名称。

--repository-name

要使用的 Azure DevOps 存储库的名称。