VSTS - Continuous Delivery - Release Trigger not w

2019-04-28 20:15发布

UPDATE 2017/02/28

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.

enter image description here

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.

Background

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.

Problem

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:

Attempt 1

enter image description here

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.

Attempt 2

enter image description here

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

Attempt 3

enter image description here

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

PS - For every attempt, I made sure that I committed a new file in git, tagged the commit, and kicked off a new CI build.

PS - Specifying a wildcard for branches like release/* works perfectly, as long as you leave the tag field empty

1条回答
姐就是有狂的资本
2楼-- · 2019-04-28 20:46

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

enter image description here

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. Edit your build definition
  2. Add PowerShell step (Inline Script: Write-Host "##vso[build.addbuildtag]myTag")
查看更多
登录 后发表回答