• 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

          Goran Sarenkapa created issue -
          Goran Sarenkapa made changes -
          Description Original: 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.
          New: 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

          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!
          mcrooney made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          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.
          Paul Walter made changes -
          Resolution Original: Not A Defect [ 7 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

          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.
          Richard Bywater made changes -
          Assignee Original: mcrooney [ mcrooney ] New: Richard Bywater [ r2b2_nz ]
          Richard Bywater made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Closed [ 6 ]

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

              Created:
              Updated: