TFSBuild命令行/vNext 2015
前提:我认为这是TFS 2015中的一个缺陷/缺失功能 当我使用TFS网站创建新的构建(非xaml)定义时,我无法使用命令行TFSBuild命令行/vNext 2015,tfs,tfsbuild,tfs-2015,azure-pipelines,Tfs,Tfsbuild,Tfs 2015,Azure Pipelines,前提:我认为这是TFS 2015中的一个缺陷/缺失功能 当我使用TFS网站创建新的构建(非xaml)定义时,我无法使用命令行TFSBuild start命令调用它 如果创建标准XAML定义,可以使用命令行启动它 如果命令行无法启动新样式的定义,您知道吗?TFS Build vNext是2015年的全新功能。因此,我怀疑旧API(2015年之前提供)能否解决这一问题。另一方面,tfsbuild.exe不太可能包含使用新REST API的代码。我会说这是预期的行为 那么从命令行启动TFS构建vNex
TFSBuild start
命令调用它
如果创建标准XAML定义,可以使用命令行启动它
如果命令行无法启动新样式的定义,您知道吗?TFS Build vNext是2015年的全新功能。因此,我怀疑旧API(2015年之前提供)能否解决这一问题。另一方面,tfsbuild.exe不太可能包含使用新REST API的代码。我会说这是预期的行为 那么从命令行启动TFS构建vNext的方法是什么
我不知道有什么特别的工具,但您可以使用Invoke rest方法和实现类似的效果。您可以使用从命令行调用构建。安装完成后,可以从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 --help
只是胡乱猜测。TFS Build vNext是2015年推出的全新功能。因此,我怀疑旧API(2015年之前提供)能否解决这一问题。另一方面,tfsbuild.exe不太可能包含使用新REST API的代码。我想说这是预期的行为。假设你是对的,那么从命令行启动TFS Build vNext的方法是什么?我不知道有什么特别的工具,但是你可以通过
Invoke RestMethod
实现类似的效果,并且你的链接对我有效,如果你添加这个作为答案,我会确认。