• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • htmlpublisher-plugin
    • None
    • Jenkins ver. 1.634
      HTML Publisher plugin ver. 1.11

      HTML directory to archive: empty
      Index page[s]: current.xhtml
      Report title: Last Report

      I have a master-slave, the workspace is only the slave. It contains my xhtml files and several folders which contain other files. HTML Publisher will copy those folder's over as well. In my case these folders are 300MB each, so it takes considerable time.

      [htmlpublisher] Archiving HTML reports...
      [htmlpublisher] Archiving at PROJECT level C:\Users\userid\Jenkins\workspace\MYJOB to C:\Jenkins\jobs\MYJOB\htmlreports\Last_Report

          [JENKINS-39527] HTML Publisher archives the entire workspace

          mcrooney added a comment -

          Thanks for taking the time to report! This is not a bug however, there is no proper way to handle this as HTML reports often generate linked pages in addition to generate css, js, and images in the same directory, so the only way to handle these resources is to archive the parent directory of the report.

          If your report is being placed in the workspace, simply add a shell step after the report is generated to create a directory and copy/move the relevant files (which only you can know about, HTML Publisher can't know which files in your workspace are related to the report), and then publish that directory I hope this helps!

          mcrooney added a comment - Thanks for taking the time to report! This is not a bug however, there is no proper way to handle this as HTML reports often generate linked pages in addition to generate css, js, and images in the same directory, so the only way to handle these resources is to archive the parent directory of the report. If your report is being placed in the workspace, simply add a shell step after the report is generated to create a directory and copy/move the relevant files (which only you can know about, HTML Publisher can't know which files in your workspace are related to the report), and then publish that directory I hope this helps!

          Paul Walter added a comment -

          Hi
          In fact, from user point of view this is an unknown behavior - I also left html directory field empty suspecting that it will just archive one selected file instead of archiving whole workspace (I was wondering how jenkins ate so much space ).

          I would propose to change default behavior when "HTML directory to archive" field is empty - create default folder,copy index file and use such folder as publishing folder.
          This will allow to publish selected html file with regards that it cannot have any linked resources.

          OR

          Do not allow empty field "HTML directory to archive", if user needs to publish workspace,let him use Jenkins var

          {WORKSPACE}

          or dot.

          Paul Walter added a comment - Hi In fact, from user point of view this is an unknown behavior - I also left html directory field empty suspecting that it will just archive one selected file instead of archiving whole workspace (I was wondering how jenkins ate so much space ). I would propose to change default behavior when "HTML directory to archive" field is empty - create default folder,copy index file and use such folder as publishing folder. This will allow to publish selected html file with regards that it cannot have any linked resources. OR Do not allow empty field "HTML directory to archive", if user needs to publish workspace,let him use Jenkins var {WORKSPACE} or dot.

          mcrooney added a comment -

          omka those are reasonable ideas, I'd welcome either as a PR!

          mcrooney added a comment - omka those are reasonable ideas, I'd welcome either as a PR!

          Since v1.14 you can now set a file include pattern which I think will help with this issue. Please reopen if that isn't the case.

          Richard Bywater added a comment - Since v1.14 you can now set a file include pattern which I think will help with this issue. Please reopen if that isn't the case.

          Tibor added a comment - - edited

          r2b2_nz 
          Is this still happening in v1.25? I cannot get it to archive one HTML file, it archives all files in a given directory, and when no directory specified, the whole workspace, it completely ignores the 'reportFiles' options and its GLOB syntax to choose particular file names.

          I think the problem is with `reportFiles` vs includes field for HTMLPubilsherTarget.
          The includes is what defines what should be copied, and user can only set 'reportFiles' field, which does nothing really.

          Tibor added a comment - - edited r2b2_nz   Is this still happening in v1.25? I cannot get it to archive one HTML file, it archives all files in a given directory, and when no directory specified, the whole workspace, it completely ignores the 'reportFiles' options and its GLOB syntax to choose particular file names. I think the problem is with `reportFiles` vs includes field for HTMLPubilsherTarget. The includes is what defines what should be copied, and user can only set 'reportFiles' field, which does nothing really.

          Alin Soare added a comment -

          I confirm that this issue strikes again!

          • Jenkins 2.263.1
          • HTML Publisher Plugin 1.22

          Alin Soare added a comment - I confirm that this issue strikes again! Jenkins 2.263.1 HTML Publisher Plugin 1.22

          Larry added a comment -

          Same issue 2.309 and plugin 1.25.  My workspace is around 12GB which takes forever to copy over.  Also changing the report name does not delete the old report (and the 12GB copy) even with Keep Past Reports unchecked, so my workspace was over 36GB before I figured it out.  Would sure be nice to not have any extra copies of the workspace.

          Larry added a comment - Same issue 2.309 and plugin 1.25.  My workspace is around 12GB which takes forever to copy over.  Also changing the report name does not delete the old report (and the 12GB copy) even with Keep Past Reports unchecked, so my workspace was over 36GB before I figured it out.  Would sure be nice to not have any extra copies of the workspace.

            r2b2_nz Richard Bywater
            jordangs Goran Sarenkapa
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: