简体   繁体   English

TFS2015 vNext构建:获取源代码的自定义步骤

[英]TFS2015 vNext build: Custom step to get sources

The first step in any vNext TFS build is a Get Sources step which is executing the tf get command. 任何vNext TFS构建的第一步都是执行tf get命令的“获取源”步骤。

I'd like to replicate this functionality in a different build step: I need to retrieve specific files/folders on a specific conditions. 我想在另一个构建步骤中复制此功能:我需要在特定条件下检索特定的文件/文件夹。

In the XAML builds I was using the Download files build activity. 在XAML构建中,我正在使用“下载文件”构建活动。

How can I achieve the same behavior without installing Visual Studio and TFS PowerTools and without installing TFS Nuget packages? 在不安装Visual Studio和TFS PowerTools且不安装TFS Nuget软件包的情况下,如何实现相同的行为? Just with what is installed default by the build agent. 以及构建代理默认安装的内容。

  1. You could run a PowerShell or a Cmd script step. 您可以运行PowerShell或Cmd脚本步骤。

  2. If you require deeper integration with the build, consider creating your own custom build task that you'd then upload to your account. 如果您需要与构建进行更深入的集成,请考虑创建自己的自定义构建任务,然后将其上传到您的帐户。 Tasks logic is in PowerShell or in JavaScript. 任务逻辑在PowerShell或JavaScript中。

In the later case, check out https://github.com/Microsoft/vsts-tasks for more details. 在后一种情况下,请查看https://github.com/Microsoft/vsts-tasks了解更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM