1

相关:Artifactory aql:查找具有给定属性的工作版本

如博客中所述,我想使用 Jfrog CLI 使用此 AQL 查询 Artifactory:

items.find(
{
  "repo":"snapshot-local",
  "artifact.module.build.name":"foo",
  "artifact.item.@vcs.Revision":"aabbccddee123456"
}
).include("artifact.module.build.number")

我对文件规范的理解是它应该遵循这些原则:

{
    "files": 
    [
        {
            "aql":{
                "items.find":{
                    "repo":"snapshot-local",
                    "artifact.module.build.name":"foo",
                    "artifact.item.@vcs.Revision":"aabbccddee123456"
                }
            }
        }
    ]
}

但是,我不确定如何请求该artifact.module.build.number属性。如何.include("artifact.module.build.number")在请求中使用与 cURL 相同的行为?

4

1 回答 1

3

今天,CLI 的 AQL 支持不允许修改返回对象的模式。这意味着您不能修改“包含”并添加来自不同域的字段。

因此,我会(在你的情况下)使用 curl (如你所建议的那样)。就像是:

items.find({
                    "repo":"snapshot-local",
                    "artifact.module.build.name":"foo",
                    "artifact.item.@vcs.Revision":"aabbccddee123456"
}).include("artifact.module.build.name","artifact.module.build.number")
于 2018-07-09T14:32:42.423 回答