Saturday, January 8, 2022

Azure DevOps YAML Pipeline Path Filters with Wildcards

When working with YAML pipelines, we can define pipeline trigger options such as branch triggers and path filters. However, there was a limitation to set path filters before. The path filters cannot have wild cards. However, now Azure DevOps supports wild cards in path filters in YAML pipelines as explain in this blog.

Pre-requisite: Repo with a code solution

Following is the project structure we are going to use for the path filter.  Once add a change to one of the cshtml files, sample YAML pipeline use in this blog should be triggered automatically.


We can set the path filter as below.

trigger:
  branches:
    include:
    - master

  paths:
    include:
    - coreSampleProject/**/*.cshtml

pool:
  vmImage'windows-latest'

No comments:

Post a Comment