Home > Net >  Azure pipeline use star in trigger paths include
Azure pipeline use star in trigger paths include

Time:10-14

I want to create a pipeline trigger in azure devops that triggers only on changes in folder named src/Subscription.*

My Folder structure:

  • src
    • Subscription.Data
    • Subscriptin.Api
    • Subscription.Shared

How my pipeline looks

trigger:
  branches:
    include:
      - development
      - master
      - release
paths:
  include:
    - src/Subscription.**/*

How can i change the include to trigger on file changes in all the folders ?

CodePudding user response:

How can i change the include to trigger on file changes in all the folders ?

Until September 8, 2021, this is still a known request on our main product forum:

Support wildcards (*) in Trigger > Path Filters

Now, it is possible now as it is written here, but the function needs to be improved:

Wild cards can be used when specifying inclusion and exclusion branches for CI or PR triggers in a pipeline YAML file. However, they cannot be used when specifying path filters. For instance, you cannot include all paths that match src/app//myapp*. This has been pointed out as an inconvenience by several customers. This update fills this gap. Now, you can use wild card characters (, *, or ?) when specifying path filters.

Now, we could use * but not ** & *.

As workaround for this issue:

trigger:
  branches:
    include:
      - development
      - master
      - release
paths:
  include:
    - src/Subscriptin.Api/*
    - src/Subscription.Data/*
    - src/Subscription.Shared/*
  • Related