0
votes

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.

1

1 Answers

0
votes

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://docs.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#repository-resource-definition