Azure devops Azure Devops rest API用于创建源提供程序bitbucket不起作用的管道
我是Azure的新手,正在尝试通过RESTAPI创建管道,URL如下 当源提供程序是Azure Git Repo时,它在请求主体下面工作得非常好Azure devops Azure Devops rest API用于创建源提供程序bitbucket不起作用的管道,azure-devops,bitbucket,azure-devops-rest-api,Azure Devops,Bitbucket,Azure Devops Rest Api,我是Azure的新手,正在尝试通过RESTAPI创建管道,URL如下 当源提供程序是Azure Git Repo时,它在请求主体下面工作得非常好 { "folder": "\\", "name": "Test-Pipeline-1", "configuration": { "type": "yaml", &quo
{
"folder": "\\",
"name": "Test-Pipeline-1",
"configuration": {
"type": "yaml",
"path":"/azure-pipelines.yml",
"repository":{
"id": "1f13f61c-eade-b36bc515bb5e",
"name": "TestAzure123",
"type":"azureReposGit"
}
}
}
但当源提供程序是Bitbucket云时,则不起作用
{
"folder": "\\",
"name": "Bitbucket-Pipeline",
"configuration": {
"type": "yaml",
"path":"/master-pipeline.yaml",
"repository": {
"id": "sid_07/Bitbucket-repository",
"name": "Bitbucket-repository",
"type": "Bitbucket"
}
}
}
我越来越不正常了
{
"$id": "1",
"innerException": null,
"message": "This API does not support creating pipelines with repositories of type Unknown.",
"typeName": "Microsoft.Azure.Pipelines.WebApi.UnsupportedRepositoryTypeException, Microsoft.Azure.Pipelines.WebApi",
"typeKey": "UnsupportedRepositoryTypeException",
"errorCode": 0,
"eventId": 3000
}
bitbucket是否支持通过rest api创建管道?还是我遗漏了什么?请帮忙
我已经参考了类似的问题
Azure Devops rest API用于创建源提供程序bitbucket不起作用的管道
{
"folder": "\\",
"name": "Bitbucket-Pipeline",
"configuration": {
"type": "yaml",
"path":"/master-pipeline.yaml",
"repository": {
"id": "sid_07/Bitbucket-repository",
"name": "Bitbucket-repository",
"type": "Bitbucket"
}
}
}
恐怕RESTAPI目前不支持创建源类型为bitbucket
的管道
当我使用下面的请求主体时,我使用它为github
的资源类型创建管道:
{
"folder": "\\",
"name": "Test-Pipeline-2",
"configuration": {
"path": "TestDemo.yml",
"repository": {
"fullName": "xxx/leotest",
"connection": {
"id": "e11d299a-0bfd-4a38-a77c-xxxxxxxx"
},
"type": "bitbucket"
},
"type": "yaml"
}
我和你犯了同样的错误:
然后,我手动创建了该管道,并使用REST API获取关于该管道的详细信息,我得到了以下信息:
"configuration": {
"path": "BitbucketRepo.yml",
"repository": null,
"type": "yaml"
},
"url": "https://dev.azure.com/xxx/xxxxx/_apis/pipelines/146?revision=2",
"id": 146,
"revision": 2,
"name": "BitbucketRepo",
"folder": "\\YAML\\Resources"
我们可以知道存储库的部分:
是null
因此,RESTAPIpipeline-Create
目前不支持使用源提供程序bitbucket创建管道
对于此请求,您可以在我们的UserVoice站点()上添加此功能,该站点是我们提供产品建议的主要论坛。感谢您帮助我们构建更好的Azure DevOps
我尝试手动创建一个,它将我转发到bitbucket进行身份验证。我建议您手动创建一个,查询管道以查看它指定的类型(如果您还没有)。你确定你提供的类型是正确的吗?@Matt我先手动尝试并传递了正确的类型,因为我在从其他api收集存储库信息时获得了该类型