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

Jenkins HTML publisher : latest html report not publishing project level when job fails

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • htmlpublisher-plugin
    • None

      Jenkins HTML publisher : I have maven-testNG-reportNG job configured in Jenkins 1.480 V.

      In HTML publish config, I have selected 'keep past html' option to Yes.

      When I build my job, it is showing latest report only under perticular build but not project level.

      It is showing latest report at both Project & Build level only when job pass.

      How can I make it to show latest report both (Project & Build level) the place in Pass and Fail both case

      Thanks,
      Mahendra

          [JENKINS-24057] Jenkins HTML publisher : latest html report not publishing project level when job fails

          Daniel Beck added a comment -

          Daniel Beck added a comment - Not a bug, behavior is deliberate and cannot be changed by the user: https://github.com/jenkinsci/htmlpublisher-plugin/blob/master/src/main/java/htmlpublisher/HtmlPublisherTarget.java#L165

          Andrew Cowlin added a comment -

          It would be good if this could be an option configured by the user.
          It causes problems if you are using the plugin to publish test results as html files.
          If the tests fail, the build fails, but you definitely want to see the published report.

          Andrew Cowlin added a comment - It would be good if this could be an option configured by the user. It causes problems if you are using the plugin to publish test results as html files. If the tests fail, the build fails, but you definitely want to see the published report.

          Daniel Beck added a comment -

          I just relabeled this from Bug (something doesn't work as intended) to Improvement (something should work differently), because it behaves as intended.

          Daniel Beck added a comment - I just relabeled this from Bug (something doesn't work as intended) to Improvement (something should work differently), because it behaves as intended.

          Andrew Cowlin added a comment -

          I saw, my comment wasn't a direct response to you, just a reason why this would be desirable.

          Andrew Cowlin added a comment - I saw, my comment wasn't a direct response to you, just a reason why this would be desirable.

          David Rubio added a comment -

          Agreed with Andrew Cowlin. That would be a really nice feature to have.

          David Rubio added a comment - Agreed with Andrew Cowlin. That would be a really nice feature to have.

          Daniel Horak added a comment -

          I would also like to be able to see html report from failed jobs.

          Daniel Horak added a comment - I would also like to be able to see html report from failed jobs.

          Code changed in jenkins
          User: Carsten Lenz
          Path:
          src/main/java/htmlpublisher/HtmlPublisherTarget.java
          src/main/resources/htmlpublisher/HtmlPublisher/config.jelly
          src/main/resources/htmlpublisher/HtmlPublisher/help.html
          src/test/groovy/htmlpublisher/HtmlPublisherTest.groovy
          http://jenkins-ci.org/commit/htmlpublisher-plugin/0e328854d2a625b550a5429b0e2c2233ffcd1d2c
          Log:
          Allow job level links to last instead of last successful build

          Contributes to JENKINS-24057
          Possibly fixes JENKINS-11689 and JENKINS-5682

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Carsten Lenz Path: src/main/java/htmlpublisher/HtmlPublisherTarget.java src/main/resources/htmlpublisher/HtmlPublisher/config.jelly src/main/resources/htmlpublisher/HtmlPublisher/help.html src/test/groovy/htmlpublisher/HtmlPublisherTest.groovy http://jenkins-ci.org/commit/htmlpublisher-plugin/0e328854d2a625b550a5429b0e2c2233ffcd1d2c Log: Allow job level links to last instead of last successful build Contributes to JENKINS-24057 Possibly fixes JENKINS-11689 and JENKINS-5682

          mcrooney added a comment -

          There's now a (non-default) option for this in htmlpublisher-1.4, please let me know if this addresses your issue!

          mcrooney added a comment - There's now a (non-default) option for this in htmlpublisher-1.4, please let me know if this addresses your issue!

          Daniel Horak added a comment -

          Is it possible to configure this option via Jenkins job builder?

          Daniel Horak added a comment - Is it possible to configure this option via Jenkins job builder ?

          mcrooney added a comment -

          Good question Daniel, that would be a question for someone familiar with that plugin. I'm not sure if it requires just a documentation change from them or a code change. You could try using "always-link-to-last-build" and seeing if that works; if not, file an issue over at https://storyboard.openstack.org/#!/project/723 for the new parameter

          mcrooney added a comment - Good question Daniel, that would be a question for someone familiar with that plugin. I'm not sure if it requires just a documentation change from them or a code change. You could try using "always-link-to-last-build" and seeing if that works; if not, file an issue over at https://storyboard.openstack.org/#!/project/723 for the new parameter

          Daniel Horak added a comment -

          Thanks mcrooney for hint, directly using "always-link-to-last-build" doesn't work, so I've created new issue for jenkins-job-publisher: https://storyboard.openstack.org/#!/story/2000270

          Daniel Horak added a comment - Thanks mcrooney for hint, directly using "always-link-to-last-build" doesn't work, so I've created new issue for jenkins-job-publisher: https://storyboard.openstack.org/#!/story/2000270

          Carsten Lenz added a comment -

          Nice idea.
          As we are currently looking into that plugin I might as well take a shot implementing this.
          I created https://issues.jenkins-ci.org/browse/JENKINS-28564 to follow this

          Carsten Lenz added a comment - Nice idea. As we are currently looking into that plugin I might as well take a shot implementing this. I created https://issues.jenkins-ci.org/browse/JENKINS-28564 to follow this

            mcrooney mcrooney
            hegdemahendra Mahendra Hegde
            Votes:
            6 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: