Bug 1878 Speed up Artifactory search 29/11629/2
authorbeierlm <mark.beierl@canonical.com>
Fri, 4 Feb 2022 16:14:33 +0000 (11:14 -0500)
committerbeierlm <mark.beierl@canonical.com>
Fri, 4 Feb 2022 21:38:03 +0000 (22:38 +0100)
The addition of the build parameter to the Artifactory search results
in what would appear to be a full index scan, taking over 2 minutes
to complete.  With this change, we still get the exact artifact
we need, however the search completes in less than 1 second.

Fixes Bug 1878

Change-Id: Ibe5987e06cac39e3651b9dbec61993c0cfb567b8
Signed-off-by: beierlm <mark.beierl@canonical.com>
jenkins/ci-pipelines/ci_helper.groovy

index f343076..c920f46 100644 (file)
@@ -29,12 +29,13 @@ def get_archive(artifactory_server, mdg, branch, build_name, build_number, patte
      "files": [
         {
           "target": "./",
-          "pattern": "${repo_prefix}${mdg}/${branch}/${build_number}/${pattern}",
-          "build": "${build_name}/${build_number}"
+          "pattern": "${repo_prefix}${mdg}/${branch}/${build_number}/${pattern}"
         }
      ]
     }"""
 
+    println("Searching Artifactory with ${downloadSpec}")
+
     def results = server.download(downloadSpec)
     // Save the list of URLs that we need to pass to the dockerfiles for build
     def debian_packages = []