-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: artifactory-plugin
-
None
In the AQL docs there are examples of sorting and limiting the results from a query.
Example:
items.find({"name" : {"$match":"*.jar"}).sort({"$asc" : ["repo","name"]}).offset(100).limit(50)
It would be great if this were also possible when using the download file specs in a pipeline (or other groovy step).
def downloadSpec = '''{
"files": [
{
"aql": {
"items.find": {
"repo": "release-local",
"path": {
"$match": "/builds/master/*"
},
"name": {
"$match": "*.tar.gz"
}
},
"sort": {
"$desc": ["updated"]
},
"limit": 1
},
"target": "./",
"regexp": "true"
}
]
}'''
artifactoryServer.download(downloadSpec)