Gitlab Continuous (CI/CD) with an Azure Web App

Recently I came across a case with helping a customer configure Gitlab with Azure web app using continuous integration. App Services support Git repositories from Bitbucket, Github, and VSTS Git natively but Gitlab requires a bit more manual setup.

3. From Gitlab, paste your repository URL which will look like git@gitlab.com:jeremycbrooks92/mytest.git. You can pull this URL from your Gitlab repository under Details -> Clone -> Clone with SSH.

Portal config continuedFinding your Git URL

4. Finally select the Branch you’d like to configure this with. The default is usually master.

5. Click Continue and if everything looks good click Finish. The deployment will fail if this is private repository as we haven’t configured authentication for the repository so proceed with the next steps.

10. Navigate back to the Azure Portal and try to click the sync button. If everything is configured correctly you should see Pending -> Then messages about the deployment starting

11. If the sync is successful the last step is to configure the webhook on the Gitlab repository side so whenever a commit is made, the repository can alert the web app to make a new pull request with the new code. If this step fails validate that you have set up the SSH key correctly and maybe wait a couple more minutes.

12. Navigate to the Properties blade of the web app copy the deployment URL. The URL contains a user name and password to access the SCM (Kudu) endpoint so don’t share it with people who shouldn’t have access to manage the app