Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45645

Artifactory plugin 2.12.* generic pipeline download does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • artifactory-plugin
    • Jenkins 2.70 on Windows Server 2012, Agents Windows 7, very few Windows 10. Plugins all latest, artifactory plugin 2.12 and 2.12.1 won't work, downgrade to 2.11 fixes the problem.

      I have started experimenting with artifactory up- and download via Jenkins pipeline with artifactory plugin 2.12. Upload was no problem, download failed. Then I saw 2.12.1 and its changes and thought, it would fix my problem. But... A downgrade to 2.11 finally made my small test job work. So there seems to be another bug with 2.12.*. My small pipeline script to reproduce is as follows:

      node('unit-tests') {
      dir("${MY_WORKSPACE}
      CommonTests") {
      stage('Download artifacts') {
      def downloadSpec = '''{
      "files": [
      {
      "pattern": "repo/BASE-PIPELINE/Binaries/15.80.0/263/sw/",
      "target": "sw/"
      }
      ]
      }'''

      def server = Artifactory.server '***@artifactory.****.net'
      server.download(downloadSpec)
      }
      }
      }

      Output is:
      Started by user
      Kuypers,Dirk
      [Pipeline] node
      Running on slave09.1 in c:\Jenkins-1\workspace\TEST_Artifactory_Download
      [Pipeline] {
      [Pipeline] dir
      Running in D:\WS\CommonTests
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Download artifacts)
      [Pipeline] getArtifactoryServer
      [Pipeline] artifactoryDownload
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // dir
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.io.IOException: Failed to search artifact by the aql 'items.find({"repo": "repo","$or": [{"$and": [
      {"path":

      {"$match":"BASE-PIPELINE/Binaries/15.80.0/263/sw"}

      ,"name":
      {"$match":"*"}}]},{"$and": [
      {"path":

      {"$match":"BASE-PIPELINE/Binaries/15.80.0/263/sw/*"}

      ,"name":
      {"$match":"*"}}]}]})': HTTP/1.1 403 Forbidden
      at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.readResponse(ArtifactoryDependenciesClient.java:161)
      at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryDependenciesClient.searchArtifactsByAql(ArtifactoryDependenciesClient.java:114)
      at org.jfrog.build.extractor.clientConfiguration.util.AqlDependenciesHelper.collectArtifactsToDownload(AqlDependenciesHelper.java:62)
      at org.jfrog.build.extractor.clientConfiguration.util.WildcardsDependenciesHelper.retrievePublishedDependencies(WildcardsDependenciesHelper.java:86)
      at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadDependencies(DependenciesDownloaderHelper.java:83)
      at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.downloadArtifactsBySpec(SpecsHelper.java:100)
      at org.jfrog.hudson.generic.FilesResolverCallable.invoke(FilesResolverCallable.java:47)
      at org.jfrog.hudson.generic.FilesResolverCallable.invoke(FilesResolverCallable.java:20)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2750)
      at hudson.remoting.UserRequest.perform(UserRequest.java:181)
      at hudson.remoting.UserRequest.perform(UserRequest.java:52)
      at hudson.remoting.Request$2.run(Request.java:336)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:98)
      at java.lang.Thread.run(Unknown Source)
      at ......remote call to JNLP4-connect connection from 1sp-slave9.rsint.net/10.0.21.186:49496(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1554)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:281)
      at hudson.remoting.Channel.call(Channel.java:839)
      at hudson.FilePath.act(FilePath.java:987)
      Caused: java.io.IOException: remote file operation failed: D:\WS\CommonTypesTests at hudson.remoting.Channel@786c6371:JNLP4-connect connection from 1sp-slave9.rsint.net/10.0.21.186:49496
      at hudson.FilePath.act(FilePath.java:994)
      at hudson.FilePath.act(FilePath.java:976)
      at org.jfrog.hudson.pipeline.executors.GenericDownloadExecutor.execution(GenericDownloadExecutor.java:41)
      at org.jfrog.hudson.pipeline.steps.DownloadStep$Execution.run(DownloadStep.java:66)
      at org.jfrog.hudson.pipeline.steps.DownloadStep$Execution.run(DownloadStep.java:46)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      at hudson.security.ACL.impersonate(ACL.java:260)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE
       

       

            eyalbe Eyal Ben Moshe
            bruce Dirk Kuypers
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: