Continuous deployment of GitLab for Azure Web App

I want to be able to use Continuous Deployment to Slot to deploy the Azure Webapp from the GitLab repository .. Specifying a branch , so I may have an intermediate development and development stage for these respective git repo branches.

Using the two links below, I was able to set up my site for continuous deployment in 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 where the GitLab provider was missing, there might be no way to point to a branch.

The gitlab-azure integration seems to be

  • User navigates to GitLab repository
  • This launches the GitLab web host, which sends some data to kudu on the azure endpoint.
  • Kudu accesses the gitlab repository using the data in the webhookpost, and the credentials it uses from the Gitlab DeployKey.

This means that gitlab must provide branch information in a webhook post.

I tried to change the value of the branch 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 that node and saving fails, as it seems like the Gitlab workaround allows you to inject a repoUrl that doesn't parse.

I created an issue in the Kudu repository ( https://github.com/projectkudu/kudu/issues/1960 ), but it seems like this fix is ​​needed on the Gitlab side. However, I didn't have an answer to my raised question. https://gitlab.com/gitlab-org/gitlab-ee/issues/455

+1


source to share


1 answer


You can do this by installing the AppSetting named deployment_branch

in your Azure Web App.



Note that Azure does not rely on the WebHook payload to know which branch to deploy. So if you push to another branch, it will still try to pull from the branch that it configured for use, and it ends up doing nothing since it was updated. This is true even if you are using GitHub instead of GitLab.

+1


source







All Articles