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

HtmlPublisher should be able to handle wildcard paths to find multiple html files

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

      I'm generating some HTML reports per module within my project, so they are in multiple directories, but I'd like to publish them all as one page with tabs to each file. So the ability to specify one path and a comma separated list of files doesn't quite work. I'd rather be able to do

      **\target\reports\fooTool*.html

      and have all found HTML files on the publish page, one tab each named for the file name being presented.

          [JENKINS-7139] HtmlPublisher should be able to handle wildcard paths to find multiple html files

          Shannon Kerr added a comment -

          I agree, this is very much needed.

          Shannon Kerr added a comment - I agree, this is very much needed.

          Mark Han added a comment -

          Any update on this?

          Mark Han added a comment - Any update on this?

          This should be fixed in 1.19 when released in that the Index pages will now allow an Ant style wildcard.

           

          Richard Bywater added a comment - This should be fixed in 1.19 when released in that the Index pages will now allow an Ant style wildcard.  

          Version 1.19 is out now (so should appear in update center soon). This adds ability for Ant style wildcards and hopefully should meet the requirements of this issue without the issue that happened in the previous implementation of it.

           

          Richard Bywater added a comment - Version 1.19 is out now (so should appear in update center soon). This adds ability for Ant style wildcards and hopefully should meet the requirements of this issue without the issue that happened in the previous implementation of it.  

          Unfortunately once again this change has had to be backed out as it breaks people who don't run the jobs on the Jenkins master. It will be reintroduced soon hopefully once the code is tweaked to pick up the file from the right place so please hang tight

          Richard Bywater added a comment - Unfortunately once again this change has had to be backed out as it breaks people who don't run the jobs on the Jenkins master. It will be reintroduced soon hopefully once the code is tweaked to pick up the file from the right place so please hang tight

          Brice Dutheil added a comment - - edited

          In the meantime, you can write :

           

          script {
              def docFiles
              dir ('build/docs/asciidoc/') {
                  docFiles = findFiles glob: '**'
              }
              publishHTML target: [
                  allowMissing         : false,
                  alwaysLinkToLastBuild: false,
                  keepAll              : true,
                  reportDir            : 'build/docs/asciidoc/',
                  reportFiles          : docFiles.join(','),
                  reportName           : 'Documentation'
              ]
          }
          
          

           

           

          Brice Dutheil added a comment - - edited In the meantime, you can write :   script { def docFiles dir ( 'build/docs/asciidoc/' ) { docFiles = findFiles glob: '**' } publishHTML target: [ allowMissing : false , alwaysLinkToLastBuild: false , keepAll : true , reportDir : 'build/docs/asciidoc/' , reportFiles : docFiles.join( ',' ), reportName : 'Documentation' ] }    

          Hi everyone - I believe I now have a fix for the issue that caused the rollback and I have now produced a beta release which it would be good to get people to have a play with and see if it meets their needs. To get the beta release (1.22-beta-1) you'll need to set your Jenkins Update Centre URL to https://updates.jenkins.io/experimental/update-center.json as documented at https://jenkins.io/doc/developer/publishing/releasing-experimental-updates/#using-the-experimental-update-center

          I've only just released the beta version so I'd imagine it might take up to 24 hours or so to show up in the update centre. Once you've had a play, it would be great if you could report back here on how you got on. If you have jobs that use the previous "normal" way you can test all the better as I'd really like to get some real usage info before releasing it publicly again.

          Thanks in advance

          Richard Bywater added a comment - Hi everyone - I believe I now have a fix for the issue that caused the rollback and I have now produced a beta release which it would be good to get people to have a play with and see if it meets their needs. To get the beta release (1.22-beta-1) you'll need to set your Jenkins Update Centre URL to https://updates.jenkins.io/experimental/update-center.json  as documented at https://jenkins.io/doc/developer/publishing/releasing-experimental-updates/#using-the-experimental-update-center I've only just released the beta version so I'd imagine it might take up to 24 hours or so to show up in the update centre. Once you've had a play, it would be great if you could report back here on how you got on. If you have jobs that use the previous "normal" way you can test all the better as I'd really like to get some real usage info before releasing it publicly again. Thanks in advance

          Sebastian added a comment -

          It works for me since two month with : */_report.html

          Sebastian added a comment - It works for me since two month with : * / _report.html

          Hi again everyone. I've finally released this as v1.22 (apologies for the long delay - I actually thought I'd released it before Christmas but obviously not :/ ). The new version should show up in the next day or so depending on the Jenkins update centre update job.

          Richard Bywater added a comment - Hi again everyone. I've finally released this as v1.22 (apologies for the long delay - I actually thought I'd released it before Christmas but obviously not :/ ). The new version should show up in the next day or so depending on the Jenkins update centre update job.

          How to pass report path dynamically?

          ex: target/reports/<currentdate>/index.html

          How can I ignore currentdate in reports path while publishing in Jenkins?

          siva krishna jampani added a comment - How to pass report path dynamically? ex: target/reports/<currentdate>/index.html How can I ignore currentdate in reports path while publishing in Jenkins?

            r2b2_nz Richard Bywater
            netappbluedevil NetAppBlueDevil
            Votes:
            17 Vote for this issue
            Watchers:
            29 Start watching this issue

              Created:
              Updated:
              Resolved: