How to Integrate Gitlab and Azure builds using WebHooks

Ricardo Schieck
Dec 2 · 1 min read

In this story I’ll show you how to use Azure builds on Gitlab.

( This story is being created, soon more details )

Why ?

Some business that were using all Azure platform to develop your software is using now Gitlab and to migrate all the ci/cds is not a very easy work, só in the case that I’ve worked with it was a good solution, use builds on TFS/Azure DevOps on Gitlab by WebHooks.

The structure !

For this project I’ve used two web hooks, two api clients and one service account hosting the tokens with the right permissions and our foreign key for the project was the build definition with the same name as the Gitlab repository, the branch of the merge request and the commit id, when the MR changes, it search on Azure api for the build status, based on the foreign key and blocks or approve the MR on Gitlab.

Results using that ?

Yes, off course, more than 70 repos was migrates from TFS to Gitlab without any type of problem in less than 6 hours, giving us more time to change the ci/cds to Gitlab pattern without problems.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade