1

Related: Artifactory aql: find builds of job with given property

As decribed in the blog, I want to query Artifactory with this AQL, using Jfrog CLI:

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

My understanding of the file specs is that it should be along those lines:

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

However, I am not sure how to request the artifact.module.build.number property. How can I get the same behavior as with cURL using .include("artifact.module.build.number") in the request ?

Florian Castellane
  • 1,197
  • 2
  • 14
  • 38

1 Answers1

4

Today the CLI's AQL support does not permit modifying the schema of the object returned. This means you can not modify the "include" and add fields from a different domain.

I would therefore (in your case) use curl (as you suggested). Something like:

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