2
votes

In my azure yml trigger I have:

trigger:
  branches:
    include:
     - refs/tags/v*
  tags:
    include: ['*']

It won't trigger the pipeline on any tag at all, even without the v.

I'm also commiting a small change when testing to make sure that it's not just the YML that's different from the previous deployment.

My code is in an organisation's private github repo and does trigger on branches, but not on tags.

2
Remove the tag from the branches, and in the tags put include: (new line) - v*Shayki Abramczyk
@ShaykiAbramczyk I tried that too, didn't work :(SebastianG
Hi,MichaelB Do you check the option I mentioned in the answer?Hugh Lin
Hi Hugh, indeed I have, as well as every variant I can thing of. It just won't work. At this point I don't know if it's a bug with my account or something...SebastianG

2 Answers

0
votes

I test with your yaml sample, there is nothing wrong with the code, it can work well.

enter image description here enter image description here

does trigger on branches, but not on tags.

From this description, I think the issue could be caused by checking the Override the YAML continuous integration trigger from here option in Triggers. If you check this option ,the trigger set in yaml will be overwritten here. enter image description here

enter image description here

0
votes

We have since switched to Github Actions just to have everything into one place, wasn't a big fun of the way Azure Pipelines already integrated into Github, non-issue though.

The issue on my side was the way the push was happening from VScode -- it wasn't pushing tags by default, so I ran:

git config --global push.followTags true

And then from vscode I've started using ctrl+shift+p to create tags and push with follow tags from that prompt, so that would be:

In order to create the tag:

enter image description here

And in order to push with the tag:

enter image description here