gpt4 book ai didi

variables - 如何使用 TFS 构建有条件地跳过或执行任务/步骤?

转载 作者:IT老高 更新时间:2023-10-28 11:23:54 32 4
gpt4 key购买 nike

我有一个 TFS 构建定义。

enter image description here

我希望有条件地运行两个执行两个命令行的步骤/任务。也许在我排队构建或其他东西时可以设置一个变量。主要是我希望运行构建并跳过一些步骤/任务,如果我愿意的话。我怎样才能做到这一点?除了制作一个执行我的 app.exe 的 bat 文件并向将执行或不执行我的 app.exe 的 bat 脚本发送一个 bool 变量。

最佳答案

2017/04/19 更新

你可以 specify conditions for running a task在 VSTS 中。

To use this feature you must enable both the New Build Editor and the Task Conditions preview features for your account.


目前,这是不可能的。 UserVoice 中有一个功能请求,并得到了STARTED的响应:

Allow build vNext/preview tasks to be conditionally enabled or disabled.

We have begun to work on this feature and it will be available on both team build and release management.

Team Services Group (Product group, Microsoft Visual Studio) responded · August 23, 2016

作为一种解决方法,您可以手动禁用构建任务(左键单击构建任务并选择禁用选定任务)如下截图: enter image description here

关于variables - 如何使用 TFS 构建有条件地跳过或执行任务/步骤?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40841173/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com