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

only reports of last executed publishHTML step are published

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • htmlpublisher-plugin
    • None
    • Jenkins 2.249.3, htmlpublisher-plugin 1.24

      There is a regression in the recently released htmlpublisher-plugin 1.24, likely introduced with this PR: https://github.com/jenkinsci/htmlpublisher-plugin/pull/55

      With this pipeline script:

      pipeline {
          agent any
          stages {
              stage('publish-html') {
                  steps {
                      writeFile file: 'foo.html', text: '<h1>Foo</h1>'
                      publishHTML([reportName: 'Foo', reportFiles: 'foo.html', keepAll: true, alwaysLinkToLastBuild: true, allowMissing: false, reportDir: pwd()])
                      writeFile file: 'bar.html', text: '<h1>Bar</h1>'
                      publishHTML([reportName: 'Bar', reportFiles: 'bar.html', keepAll: true, alwaysLinkToLastBuild: true, allowMissing: false, reportDir: pwd()])
                      writeFile file: 'foo.html', text: '<h1>New Foo</h1>'
                      publishHTML([reportName: 'Foo', reportFiles: 'foo.html', keepAll: true, alwaysLinkToLastBuild: true, allowMissing: false, reportDir: pwd()])
                  }
              }
          }
      }
      

      In 1.24, we only see the "Foo" report anymore. The "Bar" report is missing:

      Whereas in 1.23, we have this:

      Yes, we have the "Foo" report twice here, which I believe the PR attempts to fix. But we should still have the "Bar" report too.

            r2b2_nz Richard Bywater
            jpraet Jimmy Praet
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: