mortenbock
mortenbock

Reputation: 671

Triggering an Azure pipeline from a repository in a different organization

I'm trying to set up a pipeline that will trigger, when a commit is made in a repository that exists in a different organization.

In my own org, I've created a git repo with a yaml pipeline file in the main branch.

With the below setup, I can checkout the code from the other organization if I run the pipeline manually. But it is not triggered when a commit is pushed to that repository.

Looking at the documentation, this should be possible?

https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#triggers

resources:
  repositories:
  - repository: OtherOrgRepo # In a different organization
    endpoint: OtherOrgConnection
    type: git
    name: proj/reponame
    ref: develop
    trigger:
    - develop

pool:
  vmImage: ubuntu-latest

steps:

- checkout: OtherOrgRepo

The token used for the service connection has full access.

Is this not supported, or am I missing a step?

Upvotes: 0

Views: 4584

Answers (1)

mortenbock
mortenbock

Reputation: 671

I guess I just need to read the big blue box:

https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#triggers

Repository resource triggers only work for Azure Repos Git repositories in the same organization at present. They do not work for GitHub or Bitbucket repository resources.

I did however manage to trigger a classic pipeline by using a generic Git service connection, which will poll for changes at an interval.

Upvotes: 2

Related Questions