• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • htmlpublisher-plugin
    • None

      As of JENKINS-41891 in Jenkins 2.200, the way this plugin works is undesirable—much too complex, and not very functional. It should merely copy the selected files to htmlreports and then serve them via DirectoryBrowserSupport (using target="_blank" so as not to lose track of the Jenkins site) without further mutilation. No BaseHTMLAction/index, no htmlpublisher-wrapper.html generation, etc. Ideally this would be done automatically when ResourceDomainConfiguration.isResourceDomainConfigured, though currently this is a @Restricted API.

          [JENKINS-59874] Support resource domain

          Jesse Glick added a comment -

          Jesse Glick added a comment - See https://jenkins.io/security/advisory/2015-12-09/ & https://github.com/jenkinsci/htmlpublisher-plugin/pull/22 for background.

          jglick thanks for the heads up that the Resource Domain stuff has landed. I'll take a look at it although there's a couple of things that will need to be worked through namely the fact that currently the wrapper is handling the multi-index page support and the ZIP downloads (although I'm guessing this would just be a matter of writing out the wrapper at build time rather than at runtime when the report is viewed which means that all files would be served from the resource domain).

          Also I'm not sure how soon the plugin will be able to support the new resource domain functionality as, presumably, it would mean upping the minimum Jenkins requirement to the next LTS which includes it and there's still quite a large percentage of people on older versions still at the moment.

          Nevertheless I'll take a look to at least be ready to support when the time comes.

          Richard Bywater added a comment - jglick thanks for the heads up that the Resource Domain stuff has landed. I'll take a look at it although there's a couple of things that will need to be worked through namely the fact that currently the wrapper is handling the multi-index page support and the ZIP downloads (although I'm guessing this would just be a matter of writing out the wrapper at build time rather than at runtime when the report is viewed which means that all files would be served from the resource domain). Also I'm not sure how soon the plugin will be able to support the new resource domain functionality as, presumably, it would mean upping the minimum Jenkins requirement to the next LTS which includes it and there's still quite a large percentage of people on older versions still at the moment. Nevertheless I'll take a look to at least be ready to support when the time comes.

          Jesse Glick added a comment -

          To be clear, my proposal is that in a suitable instance, there would be no wrapper page—just the files archived by the user. This would match the behavior of browsing a node workspace, except of course it would work after the build completes. Nor is there are any real need for a wrapper merely to support multiple index pages, as you could just create multiple sidebar links.

          Up to you about jenkins.version. There is no particular reason to wait for an LTS release. According to statistics (which lag a few weeks), a fair portion of the users who are running the latest plugin version to begin with are also running a weekly.

          Arguably a change like this just belongs in a separate plugin.

          Jesse Glick added a comment - To be clear, my proposal is that in a suitable instance, there would be no wrapper page—just the files archived by the user. This would match the behavior of browsing a node workspace, except of course it would work after the build completes. Nor is there are any real need for a wrapper merely to support multiple index pages, as you could just create multiple sidebar links. Up to you about jenkins.version . There is no particular reason to wait for an LTS release. According to statistics (which lag a few weeks), a fair portion of the users who are running the latest plugin version to begin with are also running a weekly. Arguably a change like this just belongs in a separate plugin.

          Sagar added a comment -

          Hi jglick r2b2_nz I was also looking at the option of configuring resource root url. But what is the resource root URL. for the html files which were generated and available in Jenkins workspace ?

          To keep it simple, how to generate the resource root URL for static files or html files present in the Jenkins workspace ?

          Any help is appreciated.

          Sagar added a comment - Hi jglick r2b2_nz I was also looking at the option of configuring resource root url. But what is the resource root URL. for the html files which were generated and available in Jenkins workspace ? To keep it simple, how to generate the resource root URL for static files or html files present in the Jenkins workspace ? Any help is appreciated.

            r2b2_nz Richard Bywater
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: