GitLab持续部署天青Web应用程序 [英] GitLab Continuous Deployment to Azure Web App

查看:158
本文介绍了GitLab持续部署天青Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够用持续部署到一个蓝色的web应用部署插槽从GitLab回购.. 指定分支这样我就可以有一个分期和制定这些各自混帐回购协议的分支插槽。

使用两个链接下面我管理配置我的网站在我的部署插槽中使用连续部署。

https://forum.gitlab.com/t/is-there-true-gitlab-azure-continuous-deployment/2162/4

https://github.com/projectkudu/kudu/wiki/Continuous-deployment

不过,因为这是一个黑客绕过那里是一个缺乏GitLab提供商,它似乎并不可能以指定分支。

该gitlab-Azure集成似乎是


  1. 用户承诺的回购GitLab

  2. 这会触发GitLab网络挂接哪些职位上蔚蓝的web应用程序的端点一些数据来捻。

  3. 捻访问使用在webhookpost细节和它使用的凭据gitlab回购是从Gitlab DeployKey。

这意味着gitlab需要提供分支的详细信息,在网络挂接后。

我曾尝试通过编辑 https://resources.azure.com/

在<$c$c>https://resources.azure.com/subscriptions/<MYSUBSCRIPTIONGUID>/resourceGroups/<MYRESOURCEGROUPNAME>/providers/Microsoft.Web/sites/<MYSITE>/slots/<MYSLOT>/sourcecontrols/web

然而,在这个节点改变任何价值,因为它似乎在Gitlab解决方法允许它失败解析repoUrl的进入无法保存。

我在捻回购所造成的问题( https://github.com/projectkudu/kudu /问题/ 1960年),但似乎修复这个需要对Gitlab一边是后话。不过,我已经没有我的问题提出任何回应。
https://gitlab.com/gitlab-org/gitlab-ee/issues/455


解决方案

您可以通过设置 deployment_branch 您Azure的Web应用程序称为AppSetting做到这一点。

需要注意的是Azure不依赖于网络挂接有效载荷知道什么部署分支。所以,如果你推到一个不同的分支,它仍然会尝试从它被配置为使用分支拉动,并最终什么都不做,因为它是最新的。这是真实的,即使你使用GitHub上,而不是GitLab。

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

  1. User commits to the GitLab repo
  2. This Triggers a GitLab webhook which posts some data to kudu on the azure webapp endpoint.
  3. 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

解决方案

You can do this by setting an AppSetting called deployment_branch on your Azure Web App.

Note that Azure does not rely on the WebHook payload to know what branch to deploy. So if you push to a different branch, it'll still try pulling from the branch it's been configured to use, and end up doing nothing since it's up to date. This is true even if you use GitHub instead of GitLab.

这篇关于GitLab持续部署天青Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆