Azure Pipeline trigger on tags

Viewed 9066

I am making two pipelines. One will trigger on PR on Dev and Master branch. The another only trigger with new tags: So for the first one, I have trigger:

pr:
  - master
  - dev

And the second one:

trigger:
  tags:
    include:
    - '*'
    exclude:
    - master
    - dev

But the result is I have both triggered with PRs and the second first one is also triggered on CI. I have check there is no YAML overwrite on classic view. Any help is appreciated

1 Answers

Azure Pipeline trigger on tags

If you want the second pipeline only trigger with new tags, you should set the parameter branches to exclude master and dev branch trigger.

So, the syntax should be like:

trigger:
  tags:
    include:
    - '*'
  branches:
    exclude:
    - master
    - dev

Please check this document for some more details.

Hope this helps.

Related