Trigger Azure pipeline with multiple repos with in the project

21 views Asked by At
 trigger:
 - master

 pool:
   name: 'MobileApps'

 variables:
 - group: Signing

 resources:
   repositories:
    - repository: Commontest
      ref: Signing
      type: git
      name: Common_Test
      trigger:
       branches:
          include:
            - Signing
            - master
       
 steps:

 - checkout: self
 - checkout: Commontest

 - script: echo Hello, world!
   displayName: 'Run a one-line script'

 - script: echo $(branchname)
   displayName: 'branchname'

 - script: |
       echo $(Build.Repository.Name)
       echo $(Build.SourceBranch)

I need to trigger the pipeline if other (Commontest) repo have changes in the specific branches. -Azure-DevOps-Server-2020

When I created a commit on the branch, the trigger does not fire. Both repositories are in the same project Am I missing something?

1

There are 1 answers

1
ARIGELA KALYAN On
resources:
   repositories:
    - repository: Commontest
      ref: Signing
      type: git
      name: Common_Test
      trigger:
       branches:
          include:
            - Signing
            - master

it's working on Azure DevOps Server 2022.