将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个问题:
首先,您对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>'