更新Azure DevOps版本的变量组快照 [英] Update a variable group snapshot for an Azure DevOps release

查看:55
本文介绍了更新Azure DevOps版本的变量组快照的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个引用多个变量组的Azure DevOps发布管道,发布的每个阶段都链接到一个不同的组.

I have an Azure DevOps release pipeline that references several variable groups, with each stage in the release being linked to a different group.

当我第一次部署到阶段时,该变量组所需的值之一是未知的(Function App上某个功能的键).但是,对于某些需要完成的部署后检查,这是必需的.

When I first deploy to a stage, one of the values required for that variable group cannot be known (a key for a function on a Function App). However, it's required for some post deployment checks that need to be completed.

这不是理想的选择,但是我认为我可以进行部署,使其失败,更新变量组,然后重试.这是基于以下声明,当您编辑发行版时-

It's not ideal, but I thought I'd be able to do the deployment, have it fail, update the variable group and then try again. This is based on the following statement when you edit a release -

您可以编辑批准,任务和变量

You can edit approvals, tasks, and variables

但是,如果您编辑变量组,似乎无法将更新后的值引入发行版中.这意味着我无法进行部署的唯一方法是创建第二个发行版.

However, it seems that if you edit a variable group there is no way to pull the updated values in to the release. This means that the only way I can get my deployment out is to create a second release.

我真的很希望我能缺少一些东西,因为其他工具(例如Octopus)提供了开箱即用的功能.是否可以为发布更新可变组快照?

I'm really hoping that I'm missing something, because other tools (e.g. Octopus) offer this functionality out of the box. Is it possible to update a variable group snapshot for a release?

推荐答案

当前无法在已部署的发行版中修改变量组快照.Azure devops版本尚不支持此功能.

Variable group snapshot cannot be modified in the deployed release currently. Azure devops release doesnot support this feature yet.

但是,可以在以前部署的版本中修改变量标签下定义的变量.

However, variables defined under Variables tab can be modified in previously deployed release.

作为解决方法,您可以在变量下定义一个具有相同名称的变量,以覆盖在变量组中定义的变量.(例如,我在变量组中有一个变量 Name ,然后在也称为 Name 的变量下定义了一个新变量)

So as workaround, you can define a variable which has the same name under Variables to override the variable defined in the variable group. (For example, i have a variable Name in variable group, then i defined a new variable under Variables also named Name)

参见下文:

1,编辑发布,然后选择编辑发布

1, Edit your release and choose Edit release

2,单击变量"选项卡->添加一个与变量组中的变量具有相同名称的新变量(例如 Name )->保存

2, Click Variables tab --> Add a new variable(eg. Name) which has the same name with the variable in the variable group--> Save

3,保存更改后.转到管道标签-> 重新部署您的发行版.然后,更新后的值将被拉入发行版

3,After saving the changes. Go to Pipeline tab--> to Redeploy your release. Then the updated values will be pulled in to the release

您可以点击此处提交用户声音(点击功能,然后选择Azure开发人员).希望他们会考虑在功能冲刺中添加此功能

You can click here to submit a user voice(Click suggest a feature and choose Azure Devops)to Microsoft Development team. Hope they will consider adding this feature in the feature sprint

这篇关于更新Azure DevOps版本的变量组快照的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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