1

I am working on a task (a spike) which is about investigating the usage of pipeline (exists in) organization-1 to another organization-2.

So far I have found nothing on the Microsoft documentation about the usage of pipelines/projects/repos across organizations

Only information I have found in MS documentation (Project QnA) tells that you can move/transfer the data to another organization but not without loosing it or use the trid-party tool to copy the data.

Somewhat same information I found in this SO link (Azure DevOps Repos synchronization between Organization).

I wonder if the above two solutions are the few possible ways to use the pipeline across organizations? And does Microsoft provide any "out-of-the-box" solution for it at all?

Does anyone else tried/faced the same scenario? If so, how you resolved this? Or did you contact the Azure support for this?

Note: I also created two different organizations in DevOps and explored the ways (especially using service connections) if a pipeline or project becomes available in another organization, but, I could not found any solution for it.

Capri82
  • 418
  • 6
  • 24

1 Answers1

1

In Pipeline, if you want to use Azure Repos Git repositories in a different organization than your pipeline, you need to create Azure Repos/Team Foundation Server service connection, and use a repository resource in your pipeline:

resources:
  repositories:
  - repository: MyAzureReposGitRepository # In a different organization
    endpoint: MyAzureReposGitServiceConnection
    type: git
    name: OtherProject/MyAzureReposGitRepo

trigger:
- main

pool:
  vmImage: 'ubuntu-latest'

steps:
- checkout: MyAzureReposGitRepository

- script: dir $(Build.SourcesDirectory)

More details, check the documentation here:

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

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • Is my reply helpful? – Cece Dong - MSFT Apr 29 '21 at 06:29
  • Hi Dong, Thank you for your reply. In my case it turned that we are creating an extension while running a pipeline which can be use across organizations. But I will still give a try to your answer and will let you know if it is working or not. – Capri82 Apr 30 '21 at 07:40
  • One question though, what name: OtherProject/MyAzureReposGitRepo represent. I mean with what values shall I replace them? I mean with the values of project and repo from ORG1 or from ORG2? – Capri82 Apr 30 '21 at 07:41
  • They are should be from ORG2. – Cece Dong - MSFT May 04 '21 at 01:37
  • I am able to clone the code from repo in other organization. But, I couldn't trigger the pipeline when there is a change in the repo from other organization within azure. Any suggestions to address this ? Thanks. – Ras May 02 '22 at 23:13