简体   繁体   中英

Azure DevOps Build Pipeline cannot build with Tag and Path Filter

So I am having a strange event not firing when it should be. I have a master branch and a Azure DevOps Build Pipeline. The branch filter is set to all as * . It builds. I added a path filter with "/src/SomeFolder1" and it builds with code only checked into that folder. Perfect.

Now I added another branch filter with "refs/tags/v*" like I've always done to other build definitions on other projects with NO path filters and has ALWAYS worked.

In the git repo associated with the build pipeline I created a git tag as "v1.0.0" but nothing happens. No automatic build is being triggered. I looked at the Microsoft documentation ( https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml#tags ) and I think I am meeting the requirements. Am I missing something?

My final CI trigger is:

Branch filter:
  1) '*'
  2) 'refs/tags/v*'

Path filter:
  1) '/src/SomeFolder1'

When I remove the Path Filter, the trigger works perfectly file. It works either/or, but not both.

Based on our discussion in the comments and my testing, the issue is the path filter. It would appear that the path filter takes priority when the rules are applied. Without a change to the actual content, the branch or the tag filters never get evaluated. With tags, no actual content is changed which explains why the build isn't firing. I verified this by flipping the path filter from include to exclude. As long as you have the path filter set, it is going to look for content change.

My suggestion would be to create a feature request for the scenario you've described or setup a separate build (I know, not ideal).

Azure DevOps Build Pipeline cannot build with Tag and Path Filter

Sorry for any inconvenience.

I could reproduced this issue on my side. And this issue has been confirmed as an issue and move to the product team:

Build triggers from Git Tag are no longer working.

Unfortunately, there is no workaround for this issue currently. This issue has been reported to product group for further investigation. After the product group fixes it, this will return to normal. It may take some time, please be patient to get their feedback later.

You can vote and add your comments for this feedback. When there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM