如何在发布期间更改部署URL? [英] How to change the deployment URL during release?

查看:75
本文介绍了如何在发布期间更改部署URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个功能版本。这意味着我想基于正在合并到主分支的分支创建一个版本。

I want to create a feature release. This means I want to create a release based on the branch that's being merged into the master branch.

我理想的情况是取分支的名称并用"mysitename"连接它.azurewebsites.net"创建一个唯一的URL。 

My ideal situation would be to take the name of the branch and concat it with "mysitename.azurewebsites.net" to create a unique URL. 

我创建了一个使用ARM模板/参数文件创建App Service的版本。在我的版本中,我覆盖`name`模板值以使用变量。因此,现在当我运行我的版本时,"Azure部署:创建或更新资源
群组操作..." step根据变量中的值创建新的App Service。是否可以为每个版本创建一个唯一的变量?喜欢我建议的分支名称?

I've created a release that's using a ARM template/parameters file to create a App Service. In my release I override the `name` template value to use a variable. So now when I run my release the "Azure Deployment:Create Or Update Resource Group action on ..." step creates a new App Service based on value in the variable. Is it possible to create a unique variable for each release? Like my suggested branch name?

但主要问题是在我的版本中我必须设置"应用服务名称"。这发生在" Azure部署:创建或更新资源组操作..."之前。步。所以我不能将
分配给新创建的App Service,因为它还不存在。

But the main issue is that in my release I have to set the "App service name". This happens before the "Azure Deployment:Create Or Update Resource Group action on ..." step. So I can't assign the release to the newly created App Service since it doesn't exist yet.

推荐答案





您可以从预定义变量Build.SourceBranchName获取分支名称
You can get the branch name from predefined variable Build.SourceBranchName


这篇关于如何在发布期间更改部署URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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