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

Copy Artifact fails if selector class="hudson.plugins.copyartifact.StatusBuildSelector" is set


    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • copyartifact-plugin

      Copy artifact cannot find the artifacts of a build if "Which build" is set to "Upstream build that triggered this job".
      The configuration is ok. The copy job works fine until I change the "Which build".
      It is always reproducible.
      I learned as I ran some reproductions that this error just happens if the builds history is not located on the same machine AND not in the same instance of Jenkins.
      I have asides of a normal master/slave setup also tested what happens if the slave is on the same machine as the master (1 system, 2 different disks). Same bug.
      So a simple master installation will never run into this error. All other setups should face this issue

      The paths used are fine when looking them up on the master.
      This is unfortunately no simple fixing because the option does not address it to the master but locally
      The error also happens on 1 machine with master/slave running on it.
      It should then work if it just where about the paths as drive letter is correct and pointing to the other disc.

      There are 2 types of error messages depending on if the build containing the copy job is spawned as triggered build or via promotion.

      Output as triggered build:
      13:02:22 Deleting project workspace... [UPLOAD_Amsterdam] $ cmd /c call C:\WINDOWS\TEMP\hudson7965883506038473117.bat
      13:02:22 ReleaseLabel: 12160
      13:02:23 ERROR: Failed to copy artifacts from RB_Amsterdam with filter: zzzBuild/.zip, zzzMetaData/src/resources/IRCPanelMapping.txt
      13:02:23 hudson.util.IOException2: Failed to copy c:\Jenkins\jobs\RB_Amsterdam\builds\2012-04-20_12-39-20\archive\zzzBuild\BY_NAR_SOP8_Front.zip to c:\Jenkins_slave\workspace\UPLOAD_Amsterdam\zzzBuild\BY_NAR_SOP8_Front.zip
      13:02:23 at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:91)
      13:02:23 at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyAll(FingerprintingCopyMethod.java:63)
      13:02:23 at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:243)
      13:02:23 at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:215)
      13:02:23 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      13:02:23 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
      13:02:23 at hudson.model.Build$RunnerImpl.build(Build.java:178)
      13:02:23 at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
      13:02:23 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:473)
      13:02:23 at hudson.model.Run.run(Run.java:1413)
      13:02:23 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      13:02:23 at hudson.model.ResourceController.execute(ResourceController.java:88)
      13:02:23 at hudson.model.Executor.run(Executor.java:238)
      13:02:23 Caused by: hudson.util.IOException2: remote file operation failed: c:\Jenkins_slave\workspace\UPLOAD_Amsterdam\zzzBuild\BY_NAR_SOP8_Front.zip at hudson.remoting.Channel@15f9a23:B00015
      13:02:23 at hudson.FilePath.act(FilePath.java:828)
      13:02:23 at hudson.FilePath.act(FilePath.java:814)
      13:02:23 at hudson.FilePath.touch(FilePath.java:1160)
      13:02:23 at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:79)
      13:02:23 ... 12 more
      13:02:23 Caused by: java.io.IOException: Failed to set the timestamp of c:\Jenkins_slave\workspace\UPLOAD_Amsterdam\zzzBuild\BY_NAR_SOP8_Front.zip to 1334919183000
      13:02:23 at hudson.FilePath$19.invoke(FilePath.java:1166)
      13:02:23 at hudson.FilePath$19.invoke(FilePath.java:1160)
      13:02:23 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2154)
      13:02:23 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      13:02:23 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      13:02:23 at hudson.remoting.Request$2.run(Request.java:287)
      13:02:23 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      13:02:23 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      13:02:23 at java.util.concurrent.FutureTask.run(Unknown Source)
      13:02:23 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      13:02:23 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      13:02:23 at java.lang.Thread.run(Unknown Source)
      13:02:23 Build step 'Copy artifacts from another project' marked build as failure

      Output as promotion:
      Legacy code started this job. No cause information is available
      Building remotely on B00015_2 in workspace y:\Jenkins_slave\workspace\SEND_MAIL_AMSTERDAM_ASIA
      Unable to find a build for artifact copy from: RB_Amsterdam
      Build step 'Copy artifacts from another project' marked build as failure
      Notifying upstream projects of job completion
      Finished: FAILURE

            mindless Alan Harder
            kopfwunde Jan Seidel
            1 Vote for this issue
            3 Start watching this issue