是否能够忽略/禁用 vNext Build 中的第一步获取源代码? [英] Is it able to ignore/disable the first step Get source in vNext Build?

查看:30
本文介绍了是否能够忽略/禁用 vNext Build 中的第一步获取源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我们的情况——有时我们需要运行 vNext 构建,而无需从 TFS 服务器中提取任何源代码.

Here is our situation-- sometimes we need to run a vNext build without needing to pull any source code from TFS server.

但我们不想更改工作区映射.是否有相关设置只是在构建定义中忽略或禁用获取源步骤.与任何其他任务不同,获取源"任务在您创建新的构建定义时自动添加,无法通过右键单击来禁用或删除该任务.

But we don't want to change the workspace mappings. Is there a related setting simply ignore or disable the get source step in the build definition. Unlike any other task, the "Get sources" task added automatically when you create a new build definition, which is not able to disable or remove the task by right click it.

任何建议表示赞赏!

推荐答案

更新:

现在您应该使用以下内容来完全避免同步源:

Now you should use below to avoid syncing sources at all:

经典编辑器: agent.source.skip=true

YAML:

steps:
- checkout: none

<小时>

无法直接禁用/删除获取源任务.但是,您可以添加一个变量来实现它:


It's not able to directly disable/remove the Get Sources task. However, you could add a variable to achieve it:

Build.SyncSources = false

您可以从下面的屏幕截图中看到,Get Sources 操作开始了并在没有从 TFS 版本控制中获取数据的情况下完成

You can see from below screenshot, the Get Sources operation started and finished without fetching the data from TFS version control

注意: 此变量适用于 TFS 2017 及更高版本/VSTS vNext 版本.

更多详细信息请查看这个有用的博客.

More detail info please take a look at this helpful blog.

这篇关于是否能够忽略/禁用 vNext Build 中的第一步获取源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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