teamcity - 使用 HTTP URI 中的构建参数触发 TeamCity 构建
问题描述
我有以下 TeamCity 的构建配置(在 XML 中):
<?xml version="1.0"?>
<build>
<buildType id="my_build_config_id"/>
<comment>
<text>mybuild</text>
</comment>
<properties>
<property name="env.PARAM1" value="abc"/>
<property name="env.PARAM2" value="xyz"/>
<property name="env.PARAM3" value="123"/>
</properties>
</build>
我可以使用他们的 REST API 触发构建,如以下 XML 配置所述:
curl -v -u myuser:mypass http://teamcity.url:8111/app/rest/buildQueue --request POST --header "Content-Type:application/xml" --data-binary @build.xml
但是,我想在 URI 本身内编码我的所有构建参数。似乎没有清楚地记录如何使用所有编码为 URI 参数的 XML 来触发相同的构建。在字里行间阅读,它看起来像这样:
curl -v -u http://teamcity.url:8111/httpAuth/app/rest/buildQueue?buildType(id:my_build_config_id),comment(text:mybuild),properties(property:((name:env.PARAM1,value:abc),(name:env.PARAM2,value:xyz),(name:env.PARAM2,value:123))) --request POST
我错过了什么?
解决方案
推荐阅读
- docusignapi - 此帐户缺乏足够的权限。帐户无权通过 SMS 发送信封
- python - 使用 GLMeshItem pyqtgraph 绘制时制作透明项目
- laravel - 如何从 Laravel URL 中删除“公共”?
- javascript - html元素到pdf转换不显示图像
- laravel - 如何在laravel jetstream fortify中将注册失败的验证重定向到带有锚点的url
- c# - 在 Linq 中将字符串作为查询过滤器发送到对象
- python - Python中将接受列表对象作为参数的函数
- excel - 计算已使用行中的空单元格
- linux - 根据通过 AcceptEnv 收到的环境变量列出所有 ssh 客户端
- swift - 快速打开/关闭开关时显示/隐藏 TableViewCell 行