mcool
mcool

Reputation: 775

How to exclude everything that is not in the include - Azure DevOps YAML Pipeline

If I have a trigger that looks like this:

trigger:
  branches:
    include:
      - main
  paths:
    include:
      - abc/def/*

Is everything that is NOT in that path automatically excluded? If not, how can I exclude everything that is not in that path abc/def/*?

Upvotes: 0

Views: 1191

Answers (1)

Ging Yuan-MSFT
Ging Yuan-MSFT

Reputation: 747

According to your YAML trigger file, it should be excluded everything that is not in the include path. It is equivalent to exclude *.

You can specify file paths to include or exclude in the YAML file.

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, and the changed files that match the path filter must be from a branch that matches the branch filter.

For more information, you could refer to Paths in YAML Trigger.

Upvotes: 1

Related Questions