Creating a service connection extension to connect to GitLab
Service connections in Azure DevOps Server (and Services) lets you connect to external services. Service connections once created can be used in your build or release pipelines.
Note
Service connections are created at the project level. This means a service connection created for one project is not available in another project.
GitLab, if you don't know already, is another cloud Git service provider. Azure DevOps Server, by default, provides a service connection to connect to GitHub and lets you connect to an external Git repository using an External Git connection. Unfortunately, the External Git service connection lets you connect to one repository (or project if you are a GitLab user):
If you need to connect to another repository, you need to create another service connection with a different Git repository URL and save it as a different service connection.
We can solve this problem by creating a custom service connection that lets...