0

I am having multiple repo triggers in single YAML pipeline and for one repository I want to disable trigger when new branch created for test repository. I tried only including the path but didn't help.

repositories:
    - repository: BBB
      type: git
      name: ABC/tools
      ref: master
      trigger:
        branches:
          include:
            - testbranch/*
    - repository: AAA
      type: git
      name: ABC/test
      ref: master
      trigger:
        paths:
          include: 
            - origin/testbranch/*

Any suggestion to above sniffet

GeralexGR
  • 2,973
  • 6
  • 24
  • 33
Hanamant
  • 24
  • 6

1 Answers1

1

you could add "exclude" for this trigger. When new branches are created in this "testbranch" folder, the pipeline will be triggered. If you don't want the pipeline to be triggered, create the new branches with "old" prefix.

repositories:
    - repository: BBB
      type: git
      name: ABC/tools
      ref: master
      trigger:
        branches:
          include:
            - testbranch/*
    - repository: AAA
      type: git
      name: ABC/test
      ref: master
      trigger:
        paths:
          include: 
            - origin/testbranch/*
          exclude: 
            - origin/testbranch/old***

enter image description here

Kevin Lu-MSFT
  • 20,786
  • 3
  • 19
  • 28
Kim Xu-MSFT
  • 1,819
  • 1
  • 2
  • 4