前提:我认为这是TFS 2015中的错误/缺少功能
当我使用TFS网站创建一个新的构建(非xaml)定义时,我无法使用命令行TFSBuild start命令调用它。
如果我创建了一个标准的XAML定义,我可以使用命令行启动它。
如果命令行不能启动一个新样式的定义,你知道吗?
发布于 2015-09-03 15:23:52
TFS Build vNext是2015年的一个全新功能。因此,我怀疑旧的API (2015年前可用)能否解决这个问题。另一方面,tfsbuild.exe不太可能包含使用新REST API的代码。我认为这是意料之中的行为。
那么从命令行启动
构建vNext的方法是什么呢?
我不知道有什么特别的工具,但您可以使用Invoke-RestMethod和TFS REST API实现类似的效果。
发布于 2016-12-19 05:00:18
您可以使用tfs-cli node package从命令行调用构建。安装它之后,您可以在Windows的普通命令行中使用它,因为Node\bin目录已添加到您的path环境变量中。
Syntax:
tfx build queue --arg1 arg1val1 arg1val2[...] --arg2 arg2val1 arg2val2[...]
Command: queue
Queue a build.
Arguments:
--project Project name.
--definition-id Identifies a build definition.
--definition-name Name of a Build Definition.
Global server command arguments:
--auth-type Method of authentication ('pat' or 'basic').
--username Username to use for basic authentication.
--password Password to use for basic authentication.
--token Personal access token.
--service-url URL to the service you will connect to, e.g. https://youraccount.visualstudio.com/DefaultCollection.
--fiddler Set up the fiddler proxy for HTTP requests (for debugging purposes).
--proxy Use the specified proxy server for HTTP traffic.
Global arguments:
--help Get help for any command.
--save Save arguments for the next time a command in this command group is run.
--no-prompt Do not prompt the user for input (instead, raise an error).
--output Method to use for output. Options: friendly, json, clipboard.
--json Alias for --output json.
To see more commands, type tfx build --helphttps://stackoverflow.com/questions/32326058
复制相似问题