![](/img/trans.png)
[英]How to get status of the release (success, failure) with powershell using Azure DevOps Rest API during the release
[英]How to get status of the release (success, failure) with powershell using Azure DevOps Rest API
我正在使用post
方法在Azure DevOps
中创建发布:
$url = "https://vsrm.dev.azure.com/"+$organization+"/"+$project+"/_apis/release/releases?api-version=5.1" $body = @{definitionId = 9} | ConvertTo-Json -Depth 4 Invoke-RestMethod -Uri $url -Method POST -Body $body -ContentType "application/json" -Headers @{Authorization = ("Basic {0}" -f $base64AuthInfo)}
我的管道很简单,单阶段自动执行。 发布创建和执行工作正常。
但是如何使用powershell
和REST API
获取我的阶段的状态。 我需要在发布过程中继续执行脚本,并在任何阶段失败时启动脚本失败。
有任何想法吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.