【发布时间】:2020-04-03 17:44:55
【问题描述】:
我正在尝试使用 REST API 调用将工件从构建管道传递到发布管道。但我找不到传递工件源或工件名称的选项。我正在使用的 json 正文如下所示
{
"definitionId": 1,
"description": "test release",
"artifacts": [
{
"alias": "Customer.CI",
"instanceReference": {
"id": "2",
"name": null
}
}
],
"isDraft": false,
"reason": "none",
"manualEnvironments": null
}
其余的api调用如下
$Uri=https://vsrm.dev.azure.com/Orgname/ProjName/_apis/release/releases?api-version=5.1
Invoke-RestMethod -Method Post -UseDefaultCredentials -ContentType application/json -Uri $Uri -Body $bodyString -Headers $header
在发布管道的 POST API 调用期间如何在运行时传递不同的工件
【问题讨论】:
标签: powershell azure-devops azure-pipelines azure-pipelines-release-pipeline