-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
Jenkins Version: 1.565.3
Artifactory Plugin Version: 2.2.4
Artifactory Version: 3.2.0
When deploying artifacts and the artifacts checksum to Artifactory, the artifact itself must be uploaded before it's checksum. Otherwise Artifactory will return with an Error 404 and consequently failing the job:
05:57:24 Deploying artifact: http://artifactory:8081/artifactory/repository/artifact.rpm.md5
05:57:24 ERROR: remote file operation failed: /root/workspace/job at hudson.remoting.Channel@2c03b560:hostname
05:57:24 java.io.IOException: remote file operation failed: /root/workspace/job at hudson.remoting.Channel@2c03b560:hostname
05:57:24 at hudson.FilePath.act(FilePath.java:916)
05:57:24 at hudson.FilePath.act(FilePath.java:893)
05:57:24 at org.jfrog.hudson.generic.GenericArtifactsDeployer.deploy(GenericArtifactsDeployer.java:82)
05:57:24 at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator$1.tearDown(ArtifactoryGenericConfigurator.java:276)
05:57:24 at hudson.model.Build$BuildExecution.doRun(Build.java:170)
05:57:24 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
05:57:24 at hudson.model.Run.execute(Run.java:1706)
05:57:24 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
05:57:24 at hudson.model.ResourceController.execute(ResourceController.java:88)
05:57:24 at hudson.model.Executor.run(Executor.java:232)
05:57:24 Caused by: java.io.IOException: Failed to deploy file: HTTP response code: 404. HTTP response message: Not Found
05:57:24 at org.jfrog.build.client.ArtifactoryBuildInfoClient.throwHttpIOException(ArtifactoryBuildInfoClient.java:652)
05:57:24 at org.jfrog.build.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:527)
05:57:24 at org.jfrog.build.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:302)
05:57:24 at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.deploy(GenericArtifactsDeployer.java:182)
05:57:24 at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:154)
05:57:24 at org.jfrog.hudson.generic.GenericArtifactsDeployer$FilesDeployerCallable.invoke(GenericArtifactsDeployer.java:122)
05:57:24 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2474)
05:57:24 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
05:57:24 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
05:57:24 at hudson.remoting.Request$2.run(Request.java:328)
05:57:24 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
05:57:24 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
05:57:24 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
05:57:24 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
05:57:24 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
05:57:24 at java.lang.Thread.run(Thread.java:701)
Versus the proper order returns a successful deploy and successful job:
05:40:14 Deploying artifact: http://artifactory:8081/artifactory/repository/artifact.rpm
05:40:38 Deploying artifact: http://artifactory:8081/artifactory/repository/artifact.rpm.md5
05:40:38 Deploying build info to: http://artifactory:8081/artifactory/api/build
05:40:39 Finished: SUCCESS
Same Jenkins, Artifactory, Build Host, Code Base, and git checksum in both instances. The only difference was artifact deployment order. Either force checksum files to be uploaded last, or allow the user to specify priority order of artifact deployment.
It is possible to specify the artifact's checksums while uploading rather than adding an additional file. Artifactory should automatically create the checksum files on your behalf if you supply a checksum while uploading or use the Artifactory plugin.