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

Not reading hco.log file when build runs on a slave server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • harvest-plugin
    • None
    • Windows.

      When running build on remote slave the build fails with java io exception

      FileNotFoundExecption c:\temp\hudson\build\...\hco.log file cannot be opened.

      If I run the build on the master server only it works.

      If I copy a hco.log file to the master server and run another build on the remote slave it also works.

      Does the Harvest plug-in only expect to find the log file on the master server and not on the slave where it gets created?

      I have downloaded the source code from the trunk and have modified the code and have it working correctly on the slave.

      The code copies the hco.log file from the workspace for the build to the build directory on the Master and then reads the log before continuing.
      There were several reasons for doing the copy, the first being to reduce io across master slave servers, and secondly to have a saved copy of the hco.log file as part of the build output for audit.

      The code I used is as follows:

      FilePath SCMlogdest = new FilePath(build.getRootDir()).child("hco.log");
      FilePath SCMlog = new FilePath(workspace.getChannel(), workspace.getRemote()).child("hco.log");

      SCMlog.copyTo(SCMlogdest);

            Unassigned Unassigned
            nissancedric nissancedric
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: