【问题标题】:TFSBuild command line / vNext 2015TFSBuild 命令行 / vNext 2015
【发布时间】:2015-11-26 08:41:44
【问题描述】:

前提:我认为这是 TFS 2015 中的错误/缺失功能

当我使用 TFS 网站创建新的构建(非 xaml)定义时,我无法使用命令行TFSBuild start 命令调用它。

如果我创建标准 XAML 定义,我可以使用命令行启动它。

知道命令行是否无法启动新样式定义吗?

【问题讨论】:

  • 只是一个疯狂的猜测。 TFS Build vNext 是 2015 年的全新功能。因此,我怀疑它是否可以通过旧 API(2015 年之前可用)解决。另一方面,tfsbuild.exe 不太可能包含使用新 REST API 的代码。我会说这是预期的行为。
  • 假设你是对的,那么从命令行启动 TFS Build vNext 的方法是什么?
  • 我不知道 ad-hoc 工具,但您可以使用 Invoke-RestMethodTFS REST API 实现类似的效果
  • 您的链接对我有用,如果您将其添加为答案,我会确认。

标签: tfs tfsbuild tfs-2015 azure-pipelines


【解决方案1】:

TFS Build vNext 是 2015 年的全新功能。因此,我怀疑它是否可以通过旧 API(2015 年之前可用)解决。另一方面,tfsbuild.exe 不太可能包含使用新 REST API 的代码。我会说这是预期的行为。

那么从命令行启动 TFS Build vNext 的方法是什么?

我不知道 ad-hoc 工具,但您可以使用 Invoke-RestMethod 和 TFS REST API 实现类似的效果。

【讨论】:

    【解决方案2】:

    您可以使用tfs-cli node package 从命令行调用构建。安装完成后,您可以在 Windows 的普通命令行中使用它,前提是 Node\bin 目录已添加到您的路径环境变量中。

    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
    

    【讨论】:

      猜你喜欢
      • 2017-07-12
      • 2015-04-04
      • 1970-01-01
      • 1970-01-01
      • 2013-06-24
      • 2016-06-20
      • 2016-01-23
      • 2016-08-27
      • 1970-01-01
      相关资源
      最近更新 更多