Search code examples
azuregithubazure-devopssalesforceazure-git-deployment

Migrating Copado Deployment Process from GitHub to Azure DevOps with Multiple Projects and Shared QA/Prod Environments


We're currently running multiple Salesforce projects in parallel, with some projects already completed. We're using Copado for metadata deployment between sandboxes. Each project has its own developer sandbox, but we share a single Staging sandbox and a Production org.

Our current setup involves multiple branches for different sandboxes in a GitHub repository. Now, we're planning to migrate our entire implementation from GitHub to Azure DevOps Git. The challenge we're facing is how to map our existing GitHub repository to multiple projects in Azure DevOps. Each project in Azure DevOps should correspond to a different developer sandbox, while the QA and Production environments should remain consistent across all projects.

Does anyone have experience or advice on how to approach this migration scenario in Azure DevOps, ensuring that each project's developer sandbox is distinct, but QA and Production environments are shared across all projects?

P.S. We're using Azure DevOps as our ALM tool and aim to fully migrate from GitHub to Azure DevOps.

We have migrated the entire repository to multiple projects in azure git and deleted the branches which were not part of the project. The problem with that is the promotion and feature branches of different projects are still present in the azure git which is not something we are looking for.


Solution

  • ensuring that each project's developer sandbox is distinct

    You have migrated your GitHub repo to Azure DevOps as separate repos in different projects, the Azure repos are independent and will not affect each other.

    but QA and Production environments are shared across all projects

    Azure Repo is project-level and cannot be directly shared within the entire organization. If you just want to consume the repo corresponding to your QA and Production in pipelines, you can consider the following:

    • Add the repo corresponding to your QA and Production as a submodule to all your other repos. So that you can consume it in the pipeline when run checkout.
    • Consume the repo corresponding to your QA and Production via pipeline resource.

    The problem with that is the promotion and feature branches of different projects are still present in the azure git which is not something we are looking for.

    As I mentioned, the repos are independent, deleting a branch in one repo will not affect another repo. You need to delete each unneeded branch of the repo individually. You can do it via Azure DevOps CLI az repos ref delete.

    Perhaps you could consider migrating your GitHub repo to one Azure DevOps project. Create different teams for different "sandbox" and use branch security to control which team can access and contribute to the branch.