我有一些构建。每个构建都有两个标签。标签显示模块名称和版本。所以标签看起来像one-module
and1.2.3
或two-module
and 4.5.6
。
我可以做这个:
/httpAuth/app/rest/builds/?locator=tags:one-module,branch:unspecified:any&fields=build(tags(tag))
我会得到这个:
{
"build": [
{
"tags": {
"tag": [
{
"name": "1.2.4"
},
{
"name": "one-module"
}
]
}
},
{
"tags": {
"tag": [
{
"name": "1.2.3"
},
{
"name": "one-module"
}
]
}
}
]
}
现在我想用标签one-module
和1.2.4
. 我怎么能做到这一点?
我试试这个:
/httpAuth/app/rest/builds/?locator=tags:one-module,1.2.4,branch:unspecified:any&fields=build(tags(tag))
但我得到了这个:
Error has occurred during request processing (Bad Request).
Error: jetbrains.buildServer.server.rest.errors.LocatorProcessException: Bad locator syntax: Invalid dimension name :'1.2.4'. Should contain only alpha-numeric symbols or be known one. Details: locator: 'tags:one-module,1.2.4,branch:unspecified:any', at position 16
Invalid request. Check locator is specified correctly.
我有 TeamCity 9.1.6 版。TeamCity REST API BuildLocator文档说:
tags: - ","(comma) - 构建标签的分隔列表(仅返回包含所有指定标签的构建)
因此,我尝试通过 2 个或更多这样的标签来选择构建。这不行吗?
我做错了什么?如何通过 2 个或更多标签获得最新版本?