检查Azure中的部署状态
我正在使用以下API来从3个管道中获得最新的部署状态(如果有任何版本),然后开始在每个管道中部署。
"https://vsrm.dev.azure.com/ABC/DEF/_apis/release/deployments?definitionId=100&deploymentStatus=inProgress"
"https://vsrm.dev.azure.com/ABC/DEF/_apis/release/deployments?definitionId=101&deploymentStatus=inProgress"
"https://vsrm.dev.azure.com/ABC/DEF/_apis/release/deployments?definitionId=102&deploymentStatus=inProgress"
根据计数,我决定是否在count&gt中进行任何运行。 0。我正在研究逻辑,如果其他管道中的任何部署在其中进行,那么部署应该等待其他部署完成,因为所有部署都在部署到同一环境中。
状态检查任务也正在进行中,因此如果任务正在运行,它将无限循环等待。有什么方法可以实现这一目标。
I am using below API to get the latest deployment status(If any release going on) from 3 pipeline's before starting an deployment in each pipeline.
"https://vsrm.dev.azure.com/ABC/DEF/_apis/release/deployments?definitionId=100&deploymentStatus=inProgress"
"https://vsrm.dev.azure.com/ABC/DEF/_apis/release/deployments?definitionId=101&deploymentStatus=inProgress"
"https://vsrm.dev.azure.com/ABC/DEF/_apis/release/deployments?definitionId=102&deploymentStatus=inProgress"
Based on count I am deciding whether the any run going on in pipeline if count > 0. I am working on logic where if any deployment going on in other pipeline then Deployment should wait for other to finish since all are deploying to same environment.
The status checking task also is in progress so it is going to infinite loop to wait if task is running. Is there any way to achieve this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您的要求,您需要检查发布管道的部署状态。
为了减轻您的问题,我建议您可以为每个发行管道添加一个额外的阶段,然后您可以在新阶段添加检查部署状态。
请参阅我的步骤:
例如:
在这种情况下,您可以将检查状态步骤和部署过程分开。
有关更多详细信息,您可以参考以下文档:部署 - 列表
Based on your requirement, you need to check the Deployment status of the release pipeline.
To alleviate your issue, I suggest that you can add an additional stage to each release pipeline and then you can add the check deployment status in the new stage.
Refer to my steps:
For example:
In this case, you can separate the check status step and the deployment process.
For more detailed info, you can refer to this doc: Deployments - List