Reputation: 1490
My project structure is like
/AzureStuff/AzureAA/Source/
/AzureStuff/AzureBB/Source/
/AzureStuff/AzureCC/Source/
And my build definition:
name: $(BuildDefinitionName)
resources:
- repo: self
queue:
name: AzureBuild
trigger:
batch: true
paths:
include:
- /AzureStuff/AzureAA/Source/*
steps:
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: AzureAA'
inputs:
PathtoPublish: AzureStuff/AzureAA/Source
ArtifactName: AzureAA
However, when I commit my sources into the /AzureStuff/AzureAA/Source/ my build does not run. Only the builds for BB and CC runs because they do not have path filter. How should I change my path filter to make the AA build work? I am planning on having path filters on every build.
Upvotes: 7
Views: 16590
Reputation: 471
You're missing your branch filter
When you specify paths, you must explicitly specify branches to trigger on. You can't trigger a pipeline with only a path filter; you must also have a branch filter
trigger:
branches:
include:
- master
paths:
include:
- AzureStuff/AzureAA/Source/
Upvotes: 5
Reputation: 72191
path triggers have to be relative to the root of the repo, just like the docs mention (and the very first comment):
trigger:
batch: true
paths:
include:
- AzureStuff/AzureAA/Source
Upvotes: 9