Unable to download Artifactory using file specs from Jfrog via Jenkins pipelines

141 Views Asked by At

The Jenkins pipeline code used is given below : I am trying to download the tar from JFrog artifactory using file spec inside Jenkins pipelines and the code used is given below.

    steps {
    script {
    def artifactoryServer = getArtifactoryServer 'XYZJFROG'
    String targetFileLoc = "${WORKSPACE}\\recupTar\\"
    def buildInfo = artifactoryDownload(
    spec: """{
    "files": [{
    "pattern":"XYZ/ABC/TEST/${env.JFROG_ART_FOLDER}/${params.RecuperationTar}/${env.JFROG_ART_FOLDER}-${params.RecuperationTar}.tar",
    "target": "${targetFileLoc}"
    }]
    }""",
    buildInfo: new BuildInfo(),
    module: "TEST",
    failNoOp: true,
    server: artifactoryServer
    )
    }
    }
    }

The tar is being downloaded in multiple threads and i am getting the below given error for each thread and finally the last I/O error:

java.io.IOException: Unknown I/O error listing contents of directory: C:\Windows\TEMP\8188781397582827352
        at org.apache.commons.io.FileUtils.listFiles(FileUtils.java:2190)
        at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:333)
        at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1192)
        at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadFileConcurrently(DependenciesDownloaderHelper.java:256)
        at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.downloadArtifact(DependenciesDownloaderHelper.java:209)
    Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 94f912cc-d89c-43fb-a807-ce10c79240d6
    Caused: java.io.IOException

Any remarks, help would be much appreciated.

0

There are 0 best solutions below