在构建中添加标签不会触发发布吗? [英] Adding a tag to the build doesn't trigger release?
问题描述
我们有两个环境INT和PROD.我们有针对INT的计划触发器和针对PROD的连续部署触发器.只要验证了INT构建,我们就会在构建int_verified中添加标签. PROD上的持续部署触发器设置为针对标记为int_verified的构建触发.我希望每当将新标签添加到构建中时,便会触发触发器并开始PROD部署.但是,事实并非如此.有其他方法可以使它正常工作吗?
We have two environments INT and PROD. We have a schedule trigger for INT and continuous deployment trigger for PROD. Whenever INT build is verified we add a tag to the build int_verified. The continuous deployment trigger on PROD is set to trigger for builds with tag int_verified. I was hoping that whenever a new tag is added to the build the triggers are triggered and the PROD deployment would start. However, it doesn't seem to be the case. Is there a different way to get this working?
推荐答案
只需将构建标记添加到完成的构建中就不会触发发行.您需要在构建过程中添加构建标签.
Just add the build tag to the completed build doesn’t trigger release. You need to add build tag during the build.
例如:
- 添加PowerShell任务
-
使用以下代码添加标签:
- Add PowerShell task
Add tag by using this code:
写入主机"## vso [build.addbuildtag] int_verified"
Write-Host "##vso[build.addbuildtag]int_verified"
有关日志记录的更多信息,您可以参考:记录命令
More information about logging, you can refer to: Logging Commands
这篇关于在构建中添加标签不会触发发布吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!