无法使用 Az DevOps Pipelines API 6.0-preview.1 创建新管道 [英] Cannot create new Pipeline using Az DevOps Pipelines API 6.0-preview.1

查看:17
本文介绍了无法使用 Az DevOps Pipelines API 6.0-preview.1 创建新管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用此 API 端点创建新管道:

I'm trying to create new Pipelines using this API endpoint:

POST https://dev.azure.com/{organization}/{project}/_apis/pipelines?api-version=6.0-preview.1

这是我正在使用的请求:

This is the request I'm using:

curl -X POST \
  'https://dev.azure.com/<myorg>/<myproj>/_apis/pipelines?api-version=6.0-preview.1' \
  -H 'Authorization: Basic <b64string>' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{
    "configuration":{
    
        "repository": {
            "id": "<repo-guid>",
            "name": "<repo-name>",
            "type": "azureReposGit"
        },
        "path": "pipeline.yaml",
        "type": "yaml"
    },
    "folder": "\\custompath\\",
    "name": "<pipelinename>"
}

我一直收到同样的错误:

I keep getting the same error:

{
    "$id": "1",
    "innerException": null,
    "message": "Value cannot be null.\r\nParameter name: repositoryName",
    "typeName": "System.ArgumentNullException, mscorlib",
    "typeKey": "ArgumentNullException",
    "errorCode": 0,
    "eventId": 0
}

我的有效载荷似乎有问题,但文档对此并不是很有帮助https://docs.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/create?view=azure-devops-rest-6.0

It seems an issue with my payload, but documentation isn't very helpful about it https://docs.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/create?view=azure-devops-rest-6.0

当前版本的 nodejs sdk 还不支持 Pipeline API.有人可以帮我吗?

Current version o nodejs sdk doesn't support the Pipeline API yet. Can anyone help me?

推荐答案

我可以在我这边重现您的问题,并已在以下网站报告此问题:

I'm able to reproduce your issue on my side, and have reported this issue at website below:

https:///developercommunity.visualstudio.com/content/problem/1101376/create-pipeline-rest-api-does-not-work.html

产品团队提供的回应是"已准备好针对此问题的修复程序.它应该在接下来的 3 周内发布给所有人."

Product team has provided response that "A fix for this issue has been prepared. It should be released to everyone within the next 3 weeks."

这篇关于无法使用 Az DevOps Pipelines API 6.0-preview.1 创建新管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆