VSTS-持续交付-释放触发器不适用于标签 [英] VSTS - Continuous Delivery - Release Trigger not working with tags

查看:65
本文介绍了VSTS-持续交付-释放触发器不适用于标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发布触发器中的标签不是源代码控制标签,它们是可以在构建步骤中生成的标签.您可以自动标记您的构建(请参见下文),也可以在构建过程中手动标记您的构建,但我还没有尝试过.

The tags in the release triggers are not source control tags, they are tags that can be generated by your build step. You can tag your builds automatically (see below), or manually during a build, I haven't tried this yet.

我对标签的假设有缺陷,这使得该问题几乎无效.但是,我将尝试看看是否可以针对我的实际情况找到某种解决方法,然后将其发布在这里.

My assumption about the tags were flawed, which makes this question pretty much invalid. However I am going to try and see if I can find some sort of workaround for my exact scenario, and then I will post it here.

我正在使用VSTS建立CI/CD管道,并且分支策略的一部分是,只有标记release/*分支才会部署到生产中.

I am setting up our CI/CD pipeline using VSTS, and part of our branching strategy is that only release/* branches that are tagged will be deployed to production.

我正在尝试使用VSTS连续部署功能触发发布,该功能应该能够与分支机构和标签一起使用.最初,我尝试过此操作,以为可以对所有内容使用通配符:

I am trying to trigger a release using the VSTS Continuous Deployment feature, which should be able to work with branches and tags. At first I tried this, thinking that I could use a wildcard for everything:

该触发器从未起作用,因此我决定可能不支持该触发器(因为找不到关于它的任何文档).所以我尝试了一个显式标签.

The trigger never worked, so I decided that it is probably not supported (because I can't find any documentation around it). So I tried an explicit tag.

那也不起作用,所以我决定完全放弃release/*通配符,而只尝试使用特定的发行版分支.

That didn't work either, so I decided to abandon the release/* wildcard altogether and just attempt it with a specific release branch.

还是没有用.我要么错过了一些非常重要的步骤,要么就被打破了.请帮忙.

Still didn't work. I am either missing some really important steps here, or it is broken. Please help.

PS -对于每次尝试,我都确保我在git中提交了一个新文件,标记了提交,并启动了新的CI构建.

PS -为分支等指定通配符 release/* ,只要您将标签字段留空,

推荐答案

它由构建标记而不是源标记/标签过滤.

It is filtered by the build tag instead of source tag/label.

例如,带有myTag过滤器的发行版定义CD,则相应的新版本需要具有myTag.

For example, a release definition CD with myTag filter, then the corresponding new build need to have myTag.

要添加要构建的标签,您可以参考以下步骤:

To add the tag to build, you can refer to these steps:

  1. 编辑构建定义
  2. 添加PowerShell步骤(嵌入式脚本:Write-Host"## vso [build.addbuildtag] myTag")

这篇关于VSTS-持续交付-释放触发器不适用于标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆