Search code examples
azure-devopsgitlabdevops-services

How do I use Gitlab code/project in Azure DevOps


I would like to know the following:

  • How do I use Gitlab projects/code to build Azure pipelines?
  • If the above is difficult, is there a way that I can sync GitLab CI/CD with Azure and track all changes that are being pushed to GitLab?

The reason I ask this is that we have a team of Developers working within Gitlab and pushing changes to GitLab(with GitLab CI/CD). And we also have another team using Azure as their DevOps tool and would like to continue with azure without making major changes of tools.

To make things clearer, how can I use the same code being pushed to GitLab on azure to build pipelines and still track all commits and pushes made to Gitlab?


Solution

  • How do I use Gitlab projects/code to build Azure pipelines?

    1. Install the extension GitLab Integration for Azure Pipelines in the azure DevOps Org
    2. Open project settings->service connection->create the service connection GitLab.

    enter image description here

    1. Create azure pipeline and add the task Download GitLab repository to download the GitLab repo and use it in the Azure pipelines.

    enter image description here