【发布时间】:2021-05-17 11:44:47
【问题描述】:
尝试测试 Rest API 以通过邮递员触发 Azure-Devops,但出现以下错误。为 bash 尝试了这个并得到了类似的错误。任何帮助或建议将不胜感激
Azure Devops trigger Pipeline via rest getting issue while triggering newly created pipeline
https://dev.azure.com/{{organization}}/{{project}}/_apis/build/builds?api-version=6.1-preview.6
身体
{
"definition": {
"id": 50
}
}
错误
{
{
"$id": "1",
"innerException": null,
"message": "Value cannot be null.\r\nParameter name: DefaultBranch",
"typeName": "System.ArgumentNullException, mscorlib",
"typeKey": "ArgumentNullException",
"errorCode": 0,
"eventId": 0
}
}
YAML 文件
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'
【问题讨论】:
标签: azure-devops azure-devops-rest-api azure-devops-pipelines