Working on Cloud platforms is more challenging if you are using private repos.
I tried to find multiple blogs and support documents to resolve my issue but all in vain. Finally after so many tweaks and tricks able to complete it.
And it is very obvious to write a blog about it so others can also take help from this.
Lets move to integration setup steps instead of creating hype.
Step 1. We need to install GITLAB extension plugin.
Note: But above plugin will only allow to access repos which are available over Internet not the self hosted on private network.
Please use below link for extension installation -
GitLab Integration for Azure Pipelines - Visual Studio Marketplace
This extension integrates GitLab with Azure Pipelines. With this extension, you will be able to download the sources…
Step 2. Self hosted agent required to access Self hosted GitLab Repo
Here we have manually deployed an agent, basically works like a GITLAB-RUNNER performing tasks e.g. checkout, build and execution of test plans.
Most important point is that agent should be deployed where it can connects to private network. It could be either in VM in Azure or in VM on-premise. Agent needs to have opened connection on port 443 to Internet.
Step 3. Configuring Self Hosted agent for Azure Pipeline execution.
Please use below link to perform configuration part.
Deploy an Azure Pipelines agent on Linux - Azure Pipelines
Note In Microsoft Team Foundation Server (TFS) 2018 and previous versions, build and release pipelines are called…
Note: Agent should be deployed under Default Pool in Organisation Settings.
Organization >> Organization Settings >> Agents Pools >> Default
Once agent is ready it will show as online under Default Agents tab.
Step 4. Adding Capabilities to Agent
User defined capabilities are the software and their paths which are required to run the azure pipeline on our agent
Click on agent name >> Capabilities >> Add user defined capabilities
- Capabilities we have added are GIT for Checkout and Maven for Build.
Step 5. Use Other GIT option while creating pipeline.
Organization >> Project >> Pipelines >> New
Use HTTPS clone URL for GitLab project. Also enter User name and Password/Token to access Self Hosted GITLAB repo.
Now we are All Set to run our Azure Pipeline !!!