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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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. 

            Assignee:
            Richard Bywater
            Reporter:
            Brandon
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: