I want to be able to use Continuous deployment to an Azure webapp deployment slot from a GitLab repo.. Specifying the branch so i can have a staging and develop slot for these respective git repo branches.
Using the two links below i managed to configure my website to use continuous deployment on one of my deployment slots.
https://forum.gitlab.com/t/is-there-true-gitlab-azure-continuous-deployment/2162/4
https://github.com/projectkudu/kudu/wiki/Continuous-deployment
However since this is a hack to get around there being a lack of a GitLab provider, It doesn't appear to be possible to specify the branch.
The gitlab-azure integration seems to be
- User commits to the GitLab repo
- This Triggers a GitLab webhook which posts some data to kudu on the azure webapp endpoint.
- Kudu accesses the gitlab repo using the details in the webhookpost and the credentials it uses are from the Gitlab DeployKey.
This implies that gitlab needs to provide the branch details, in the webhook post.
I did try to edit the branch value via https://resources.azure.com/
in https://resources.azure.com/subscriptions/<MYSUBSCRIPTIONGUID>/resourceGroups/<MYRESOURCEGROUPNAME>/providers/Microsoft.Web/sites/<MYSITE>/slots/<MYSLOT>/sourcecontrols/web
However changing any value in this node and saving fails as it seems the Gitlab workaround allows entry of an repoUrl which fails the parsing.
I created an issue in the Kudu repo (https://github.com/projectkudu/kudu/issues/1960) but it seems fixing this is something needed on the Gitlab side. However I've not had any response to my raised issue. https://gitlab.com/gitlab-org/gitlab-ee/issues/455