• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • 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)
      

          [JENKINS-42292] Sort, limit results via AQL download spec

            Unassigned Unassigned
            stephenash Stephen Ash
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: