【发布时间】:2021-08-13 05:58:45
【问题描述】:
我试图使用Pipeline - Create Azure DevOps REST API 创建一个 yml 管道,即使我在 yml 文件中提到了池,它也会抛出异常“未指定池”。有关此问题的更多详细信息,请访问 here。 请在下面找到用于创建管道的请求正文。
{
"folder": "",
"name": "pipeline-by-api",
"configuration": {
"type": "yaml",
"path": "/azure-pipelines.yml",
"repository": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "repo-by-api",
"type": "azureReposGit"
}
}
然后我确定了第二个 REST API,Definitions - Create,并使用它成功地创建了一个管道。请在下方找到用于创建构建定义的请求正文。
{
"process":{
"yamlFilename": "azure-pipelines.yml"
},
"queue":{
"pool":{
"name": "Azure Pipelines"
}
},
"repository": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "TfsGit",
"name": "repo-by-api",
"defaultBranch": "refs/heads/master"
},
"name": "pipeline-by-api",
"path": "\\API-Test",
"type": "build",
"queueStatus": "enabled"
}
我想了解两者之间的区别。我试过Definitions - Create 因为Pipelines - Create 不适合我。但这是创建管道的正确方法吗?
【问题讨论】:
标签: azure azure-devops azure-pipelines azure-devops-rest-api