Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1286

Exception When Downloading Artifacts with FileSpec using Build and Pattern For Plugin v3.5.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 4 - Normal
    • Resolution: Done
    • Affects Version/s: 3.5.0
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      Jenkins: v2.204.1

      Artifactory: v5.11.6

      Jenkins Artifactory Plugin: v3.5.0

      Implementation:  Jenkins Scripted Pipeline

    • Regression:
      Yes

      Description

      After upgrading to v3.5.0 of the Artifactory Plugin for Jenkins, our pipeline job throws an exception when attempting to download artifacts from a generic repository when both the pattern and build fields are populated.

      Repo :

      Both "Release" and "Debug" files uploaded as one build:

      • <repo name>/ .... /devCentaurus/< Build Number >/Release/<artifacts>
      • <repo name>/ .... /devCentaurus/< Build Number >/Debug/<artifacts>

      File Spec:

      NOTE:  Had to use <star> instead of the actual star character in the "pattern" as it kept turning the pattern into an emoji  and making some text bold
      {
        "files": [
          {

            "pattern": "generic-dcar-devices-all/ELO/Centaurus/<star><star>/devCentaurus/<star>/(<star>)/<star>,

            "build": "DCAR :: Centaurus :: App :: MACVU360 :: Linux-IMX6-Dev :: devCentaurus/LATEST",

            "target": "Download/Development/{1}/",

            "flat": "true"

              }
        ]
      }

      Exception when attempting to download:

       

      hudson.remoting.Channel$CallSiteStackTrace: Remote call to EC2 (AWS) - Linux (i-0d2efae23c28bd4f7)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
      at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      at hudson.remoting.Channel.call(Channel.java:955)
      at hudson.FilePath.act(FilePath.java:1069)
      at hudson.FilePath.act(FilePath.java:1058)
      at org.jfrog.hudson.pipeline.common.executors.GenericDownloadExecutor.execute(GenericDownloadExecutor.java:49)
      at org.jfrog.hudson.pipeline.scripted.steps.DownloadStep$Execution.run(DownloadStep.java:73)
      at org.jfrog.hudson.pipeline.scripted.steps.DownloadStep$Execution.run(DownloadStep.java:52)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      at hudson.security.ACL.impersonate(ACL.java:290)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      java.io.IOException: Failed to search artifact by the aql 'items.find({"artifact.module.build.name": "DCAR :: Centaurus :: App :: MACVU360 :: Linux-IMX6-Dev :: devCentaurus","artifact.module.build.number": "547"}).include("actual_sha1")': HTTP/1.1 400 Bad Request
      at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.getResponseStream(ArtifactoryDependenciesClient.java:144)
      at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.searchArtifactsByAql(ArtifactoryDependenciesClient.java:120)
      at org.jfrog.build.extractor.clientConfiguration.util.AqlHelperBase.fetchBuildArtifactsSha1(AqlHelperBase.java:246)
      at org.jfrog.build.extractor.clientConfiguration.util.AqlHelperBase.filterResult(AqlHelperBase.java:232)
      at org.jfrog.build.extractor.clientConfiguration.util.AqlHelperBase.run(AqlHelperBase.java:52)
      at org.jfrog.build.extractor.clientConfiguration.util.ArtifactorySearcher.SearchByFileSpec(ArtifactorySearcher.java:39)
      at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadDependencies(DependenciesDownloaderHelper.java:85)
      at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.downloadArtifactsBySpec(SpecsHelper.java:140)
      at org.jfrog.hudson.generic.FilesResolverCallable.invoke(FilesResolverCallable.java:51)
      at org.jfrog.hudson.generic.FilesResolverCallable.invoke(FilesResolverCallable.java:21)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3069)
      at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      at hudson.remoting.Request$2.run(Request.java:369)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
       

      Troubleshooting:

      • I simplified the pattern to be 'generic-dcar-devices-snapshot/ELO/Centaurus/App/MACVU360/Linux-IMX6-Dev/devCentaurus/<star>/Release/<star>' with the same exception.
      • I kept everything the same and reverted the Artifactory plugin back to v3.4.0, and the build then succeeds as expected.

       

        Attachments

          Activity

            People

            Assignee:
            eyalb Eyal Ben Moshe
            Reporter:
            Jerel.Olstad Jerel Olstad
            Votes:
            11 Vote for this issue
            Watchers:
            16 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: