能ignore/disable vNext Build 中的第一步Get source 吗?
Is it able to ignore/disable the first step Get source in vNext Build?
这是我们的情况 -- 有时我们需要 运行 vNext 构建而不需要从 TFS 服务器提取任何源代码。
但我们不想更改工作区映射。是否有相关设置只是 忽略或禁用构建定义中的获取源步骤。与任何其他任务不同,“Get sources”任务会在您创建新的构建定义时自动添加,无法通过右键单击它来禁用或删除该任务。
感谢任何建议!
更新:
现在您应该使用以下内容来完全避免同步源:
经典编辑器: agent.source.skip=true
YAML:
steps:
- checkout: none
无法直接disable/remove Get Sources 任务。但是,您可以添加一个变量来实现它:
Build.SyncSources = false
You can see from below screenshot, the Get Sources operation started
and finished without fetching the data from TFS version control
注意: 此变量适用于 TFS 2017 和 above/VSTS vNext 构建.
更多详细信息请查看这个有用的 blog。
我尝试使用 agent.source.skip = true
(而不是 Build.SyncSources = false
),
而且它似乎保留了变量。
在此处找到:https://github.com/Microsoft/azure-pipelines-agent/issues/1465
这里是经典编辑器中跳过“Get Sources”的方法。
这是我们的情况 -- 有时我们需要 运行 vNext 构建而不需要从 TFS 服务器提取任何源代码。
但我们不想更改工作区映射。是否有相关设置只是 忽略或禁用构建定义中的获取源步骤。与任何其他任务不同,“Get sources”任务会在您创建新的构建定义时自动添加,无法通过右键单击它来禁用或删除该任务。
感谢任何建议!
更新:
现在您应该使用以下内容来完全避免同步源:
经典编辑器: agent.source.skip=true
YAML:
steps:
- checkout: none
无法直接disable/remove Get Sources 任务。但是,您可以添加一个变量来实现它:
Build.SyncSources = false
You can see from below screenshot, the Get Sources operation started and finished without fetching the data from TFS version control
注意: 此变量适用于 TFS 2017 和 above/VSTS vNext 构建.
更多详细信息请查看这个有用的 blog。
我尝试使用 agent.source.skip = true
(而不是 Build.SyncSources = false
),
而且它似乎保留了变量。
在此处找到:https://github.com/Microsoft/azure-pipelines-agent/issues/1465
这里是经典编辑器中跳过“Get Sources”的方法。