防止在门控登机签入版本上触发释放 [英] Prevent Release Trigger on Gated Check-in build

查看:51
本文介绍了防止在门控登机签入版本上触发释放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不产生任何伪像的Gated检入构建上停止释放触发器?

How to stop the release trigger on Gated check-in build which doesn;t produce any artifact?

我有一个启用了门控"检入的构建定义.在发布和发布工件步骤"中,我将条件设置如下:

I have a build definition with Gated check-in enabled. In Publish and Publish Artifact Steps I have set the condition as following:

ne(variables ['Build.Reason'],'CheckInShelveset')

这意味着-如果构建是由Gated检入触发的,请不要运行此步骤.

which means - if the build was triggered by Gated check-in, do not run this step.

在此构建运行的drop文件夹中没有看到任何文件,但在封闭的构建完成运行后立即触发该版本.

I do not see any files in drop folder of this build run but the release is being triggered as soon the gated build completes running.

我添加了图像以供参考.

I've added images for reference purposes.

  • 图1显示了构建定义的配置.
  • 图2显示发布"步骤未运行,因为它是封闭式构建.
  • 图3显示即使在drop(输出)文件夹中什么也没有的情况下,释放是由同一版本触发的!

这对我来说非常令人惊讶.有帮助吗?

This is very surprising to me. Any help?

谢谢!

推荐答案

在第一个环境中,您可以设置一个工件过滤器,然后输入Include TriggerRelease:

There is an option on the first environment where you can set an Artifact filter, enter Include TriggerRelease:

通过标记您的内部版本(如果它不是封闭式检入),您可以防止发布被触发.您可以运行一个小的魔术日志命令以在构建中设置标签:

By tagging your build (in case it's not a gated check-in), you can prevent the release from triggering. You can run a small magic log command to set the tag in the build:

Write-Host "##vso[build.addbuildtag]TriggerRelease"

或者您可以使用以下扩展名中的构建任务来自己构建标签:

这篇关于防止在门控登机签入版本上触发释放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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