带参数的触发器构建

问题描述 投票:0回答:1

将TC升级到2018年之后我以前使用参数触发TC构建的脚本不起作用

我们正在使用的脚本使用以下api:

https:// [服务器] /httpAuth/action.html?add2Queue= [内部版本名称]&name = [参数名称]&value = [参数值]

我正在尝试迁移到restApi来自(https://confluence.jetbrains.com/display/TCD18/REST+API#RESTAPI-QueuedBuilds):

我尝试过

https:// [服务器] / app / rest / buildQueue?locator = buildType:[内部名称],[参数名称]:[参数值]

当前我有2个问题:

  1. 我成功触发了构建-但尚未触发
  2. 文档不清晰,如何使用参数触发构建?能否请您提供有关如何使用参数成功触发构建的建议(也可以大于1)]
teamcity
1个回答
0
投票

首先,您对TeamCity的文档尚不明确。尊重此link;

您可以使用下面的curl脚本。

curl -X POST \
http://localhost:8111/httpAuth/app/rest/buildQueue \
-H 'Accept: application/json' \
-H 'Content-Type: application/xml' \
-d '<build><buildType id="YourBuildTypeId"/>
<properties><property name="PARAM1" value="VALUE1"/></properties>
</build>'
© www.soinside.com 2019 - 2024. All rights reserved.