如何自动用一个较新的版本替换/拒绝一个待发布的版本? [英] How do I automatically replace/reject a pending release with a newer one?

查看:154
本文介绍了如何自动用一个较新的版本替换/拒绝一个待发布的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个管道,该管道可以自动构建代码并将其部署到我的登台环境中.对于我的生产环境,我有一个部署前的手动批准门,这样,只有经过某种审查的版本才会向客户发布.到目前为止一切顺利.

I have a pipeline that is automatically building and deploying code to my staging environment. For my production environment I have a pre-deployment manual approval gate so that only releases that have gone through some review will go out to customers. So far so good.

问题在于,随着新发行版进入暂存环境,现在有越来越多的发行版列表正在排队等待手动批准.为了发布最新版本,我需要手动拒绝每个中间版本.这已经成为一个费力的过程.

The problem is that as new releases go out to the staging environment there is a growing list of releases that are now queued for this manual approval. In order to release the most recent version I need to go and manually reject each of the intermediate releases. This has become a laborious process.

每当有新版本登台时,我都会自动拒绝先前版本的生产部署.

I would like to automatically reject the production deploy of the previous release every time a new release goes to staging.

我已经查看了MS文档,SO,管道设置,可用的管道发布任务,但找不到解决方法.

I've looked at the MS docs, SO, the pipeline settings, the available pipeline release tasks and can't find a way to do this.

显示旧版本的发布历史记录正在排队等待批准:

Release History showing old release queued for approval:

推荐答案

可以通过在部署队列设置"区域中进行更改来控制类似行为.切换为部署最新版本并取消其他版本"将自动取消先前排队的版本,并将较新的版本排队.如果您像我一样打开了Slack集成,则会看到取消消息.

Looks like this behavior can be controlled by making a change in the Deployment Queue Settings area. Switching to "Deploy latest and cancel the others" will automatically cancel the previously queued release and queue the newer one. If you have Slack integration turned on (as I do) you will see a cancellation message.

只要您的过程足够简单,以至于您知道何时进行新的构建,就感觉这是良好的行为.它为您提供了基本的手动门,而不会增加任何其他开销.

So long as your process is simple enough that you know when new builds are being made, this feels like good behavior. It gives you a basic manual gate without adding any other overhead.

这里有更多文档: https://docs.microsoft.com/zh-cn/azure/devops/pipelines/process/stages?view=azure-devops&s=amp=#ic#queuing-policies

部署队列设置:后续版本

这篇关于如何自动用一个较新的版本替换/拒绝一个待发布的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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