小编Lub*_*bos的帖子

Azure YAML pipeline 是否支持触发器中路径筛选器中的通配符?

我在 git 存储库中有这样的项目(文件夹)结构:

/src
/src/Sample.Backend.Common
/src/Sample.Backend.Common.Tests
/src/Sample.Backend.Common.Domain
/src/Sample.Backend.Common.Domain.Tests
/src/Sample.Backend.Pricing.Abstractions
/src/Sample.Backend.Pricing.Domain
/src/Sample.Backend.Pricing.Domain.Tests
/src/Sample.Backend.Pricing.Persistence
/src/Sample.Backend.Pricing.Persistence.Tests
/src/Sample.Backend.Accounting.Abstractions
/src/Sample.Backend.Accounting.Domain
/src/Sample.Backend.Accounting.Domain.Tests
/src/Sample.Backend.Accounting.Persistence
/src/Sample.Backend.Accounting.Persistence.Tests
/src/Sample.Backend.Api
/src/Sample.Common
/src/Sample.Frontend.Common
/src/Sample.Frontend.Web
/src/Sample.Tests.Common
Run Code Online (Sandbox Code Playgroud)

(示例已简化,实际上有更多的项目/文件夹。)

我想要不同的部分有不同的管道。例如,只要在任何后端master项目的分支中提交任何文件,就会触发管道。像这样的东西:

trigger:
  branches:
    include:
    - master
  paths:
    include:
    - src/Sample.Backend.*
    - src/Sample.Common
    - src/Sample.Tests.Common
Run Code Online (Sandbox Code Playgroud)

问题是,该过滤器src/Sample.Backend.*不起作用。我必须添加每个后端文件夹的确切名称才能使其正常工作。我可以使用exclude,但我有同样的问题 - 还有很多其他项目,我必须将它们全部命名。

我发现不支持通配符:https://github.com/MicrosoftDocs/azure-devops-docs/issues/397#issuecomment-422958966

还有其他方法可以达到相同的结果吗?

azure-devops azure-pipelines azure-yaml-pipelines

4
推荐指数
1
解决办法
7537
查看次数