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

HTML Publisher plugin does not publish html until a successful build occurs

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • htmlpublisher-plugin
    • None
    • Jenkins 2.479.2
      HTML Publisher 1.37

      The HTML Publisher plugin will not publish HTML Reports until a successful build occurs.

      We have a team that is using the HTML Publisher to provide access to coverage data. If the initial job (or subsequent jobs) fails after the coverage html is published the report is not accessible. So if build 1 to 7 fail for other reasons in a subsequent stage the coverage reports will never be accessible.

      However if the first job succeeds and the second job fails, the coverage published in the second job will be accessible.

      This can be reproduced with this stage logic. 

            steps {
                sh 'mkdir html && echo "Artifact from Build#: $BUILD_NUMBER" > html/index.html'
                
                  publishHTML(target: [
                      allowMissing         : true,
                      alwaysLinkToLastBuild: true,
                      keepAll              : false,
                      reportDir            : 'html',
                      reportFiles          : 'index.html',
                      reportName           : "HTML Report"])
                sh '''if [ $BUILD_NUMBER -eq 1 ]; then
                        exit 1
                      fi'''
              } 

      Our expectation is that the publish HTML reports should always be accessible regardless of job status if the publishHTML plugin is called.

      I reviewed the plugin page and didn't see anything specifically stating that html would not be published until a successful build occurs. 

          [JENKINS-75282] HTML Publisher plugin does not publish html until a successful build occurs

          Mark Waite added a comment -

          I believe that this is a duplicate of JENKINS-71082

          Mark Waite added a comment - I believe that this is a duplicate of JENKINS-71082

          Brandon added a comment -

          Yes it is, sorry for the duplicate.

          Brandon added a comment - Yes it is, sorry for the duplicate.

            r2b2_nz Richard Bywater
            bbouchard Brandon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: