I am trying to upload files into Artifactory repo using my Jenkins file. The pipeline fails at the Artifactory upload stage.
I'm using Jfrog-Artifactory Plugin version: 3.15.4.
#Pipeline Script
rtUpload (
serverId: 'app1-artifactory',
spec: """{
"files": [
{
"pattern": "*app*.tar.gz",
"target": "myrepo/${Artifactory_Directory}/${Bld_ID}/artifacts/"
},
{
"pattern": "*app*.tar.Z",
"target": "myrepo/${Artifactory_Directory}/${Bld_ID}/artifacts/"
}
]
}"""
)
#Error
java.lang.Exception: Error occurred during operation, please refer to logs for more information.
at org.jfrog.build.extractor.producerConsumer.ProducerConsumerExecutor.start(ProducerConsumerExecutor.java:85)
at org.jfrog.build.extractor.clientConfiguration.util.spec.SpecsHelper.uploadArtifactsBySpec(SpecsHelper.java:101)
at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:166)
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to mymachine
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:1001)
at hudson.FilePath.act(FilePath.java:1159)
at hudson.FilePath.act(FilePath.java:1148)
at org.jfrog.hudson.pipeline.common.executors.GenericUploadExecutor.execute(GenericUploadExecutor.java:56)
at org.jfrog.hudson.pipeline.declarative.steps.generic.UploadStep$Execution.runStep(UploadStep.java:39)
at org.jfrog.hudson.pipeline.declarative.steps.generic.UploadStep$Execution.runStep(UploadStep.java:24)
at org.jfrog.hudson.pipeline.ArtifactorySynchronousNonBlockingStepExecution.run(ArtifactorySynchronousNonBlockingStepExecution.java:54)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused: java.lang.RuntimeException: Failed uploading artifacts by spec
at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:168)
at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:117)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3317)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at hudson.remoting.InterceptingExecutorService$$Lambda$8/0x000000008800fe60.call(Unknown Source)
at java.util.concurrent.FutureTask.run(FutureTask.java:277)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.lang.Thread.run(Thread.java:825)
Sometimes on rebuilding the pipeline, it runs without errors and the files are uploaded to the repo successfully. What could be the issue?
This seems to be an open issue https://issues.jenkins.io/browse/JENKINS-66424
Downgrading the Artifactory Plugin to version 3.10.5 is the workaround till the issue gets resolved.