Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Command line interface 如何通过VSTS CLI将构建变量传递给VSTS?_Command Line Interface_Azure Devops_Azure Pipelines_Azure Pipelines Build Task - Fatal编程技术网

Command line interface 如何通过VSTS CLI将构建变量传递给VSTS?

Command line interface 如何通过VSTS CLI将构建变量传递给VSTS?,command-line-interface,azure-devops,azure-pipelines,azure-pipelines-build-task,Command Line Interface,Azure Devops,Azure Pipelines,Azure Pipelines Build Task,我试图使用VSTS-CLI启动具有不同构建变量的构建。我已经能够使用以下命令启动构建: -/Users/ksg01/lib/vsts-cli/bin/vsts build queue --definition-name PointToPoint-nLightAir-Automation --open --source-branch develop --instance xxxxxxxxxxxxxxx --project xxxxxxxxxxxxxxxxxxx 这些是我正在尝试更新的 但是我

我试图使用VSTS-CLI启动具有不同构建变量的构建。我已经能够使用以下命令启动构建:

 -/Users/ksg01/lib/vsts-cli/bin/vsts build queue --definition-name PointToPoint-nLightAir-Automation --open  --source-branch develop --instance xxxxxxxxxxxxxxx --project xxxxxxxxxxxxxxxxxxx
这些是我正在尝试更新的


但是我还没有找到一个参数来传递构建变量。我该怎么做?或者有什么资源可以提供帮助?

据我所知,VSTS CLI无法添加参数。使用Postman的CLI工具Newman,我能够向VSTS REST API发送查询并对生成进行排队。

尽管在任何Microsoft文档中都没有记录该查询,但如果您从命令行VSTS build queue-h请求帮助,它描述了一个-variables属性,可用于传递以空格分隔的名称=值对。我已成功地使用它将msbuild属性传递给我的生成定义vsts生成队列定义名称mybuild-variables myvar=value


环境信息:vsts cli 0.1.1,Visual Studio 2017

好的,如果有人想做同样的事情,请进行更新。最后,我使用Postman向VSTS REST API发送了一个POST请求来完成这项任务。为了让它更上一层楼,我目前正在研究newman,它是一个用于Postman的CLI工具。祝你好运您可以添加答案中使用的方式并接受它。