• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • Jenkins 2.19.4 (LTS)
      Plugins affected
      io.jenkins.blueocean:blueocean:1.0.0-b14
      org.jenkins-ci.plugins:htmlpublisher:1.11
    • Blue Ocean 1.2

      Ready for release

      This improvement is completed and scheduled for release in 1.2. Check the roadmap page for updates.

      Original request
      I Have a really basic repo I wanted to test with Blue Ocean. As part of the build script

      node {
          stage('Cleanup') {
              sh 'rm -rf ./*'
          }
          stage('Fetch from GitHub') {
              sh 'git clone https://github.com/Lewiscowles1986/julid'
          }
          dir('julid') {
              stage('Test') {
                  sh 'gradle test'
              }
              
              
              stage('Build') {
                  sh 'gradle build'
              }
          }
          stage('Report Gathering') {
              publishHTML([allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'julid/build/reports/tests', reportFiles: 'index.html', reportName: 'JUnit Test Reports'])
              publishHTML([allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'julid/build/reports/jacoco', reportFiles: 'index.html', reportName: 'JaCoCo Coverage Reports'])
          }
          stage('Package') {
              sh 'cd julid && gradle jar'
          }
      }
      

      It still shows in the old UI but not in artifacts or any reports for the Blue Ocean. It's deliberately a really naive example as I am learning and testing new things

          [JENKINS-40616] publishHTML on blueocean

          Code changed in jenkins
          User: R. Tyler Croy
          Path:
          content/projects/blueocean/roadmap/data.json
          http://jenkins-ci.org/commit/jenkins.io/44b733af555456cff8af6027a49d4246375aa53a
          Log:
          Merge pull request #1068 from i386/patch-6

          Add JENKINS-40616 to Blue Ocean roadmap

          Compare: https://github.com/jenkins-infra/jenkins.io/compare/140721029724...44b733af5554

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: R. Tyler Croy Path: content/projects/blueocean/roadmap/data.json http://jenkins-ci.org/commit/jenkins.io/44b733af555456cff8af6027a49d4246375aa53a Log: Merge pull request #1068 from i386/patch-6 Add JENKINS-40616 to Blue Ocean roadmap Compare: https://github.com/jenkins-infra/jenkins.io/compare/140721029724...44b733af5554

          James Dumay added a comment - - edited

          Available in Blue Ocean 1.2 shortly

          James Dumay added a comment - - edited Available in Blue Ocean 1.2 shortly

          Mukul Garg added a comment -

          Hi,

          I have included HTML publisher in my pipeline code but unable to see the tab on blueocean UI.

          Mukul Garg added a comment - Hi, I have included HTML publisher in my pipeline code but unable to see the tab on blueocean UI.

          Vivek Pandey added a comment -

          gargmukku07 Not in tab. It should appear in the artifacts with link. Click on the link to see the HTML content. Please try and let us know.

          Vivek Pandey added a comment - gargmukku07 Not in tab. It should appear in the artifacts with link. Click on the link to see the HTML content. Please try and let us know.

          Anders Pikas added a comment - - edited

          I have the same problem. No links to the published HTML on Blue Ocean.

          I'm running Jenkins 2.79, Blue Ocean 1.2.4. Pipeline:

          publishHTML(target: [allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'doc/internal/html', reportFiles: 'index.html', reportName: 'DOC', reportTitles: ''])

          The link appears in the old UI on the page for e.g. "PR-919/", but not for a particular build, e.g. "PR-919/1/".

          This is unlike the old UI artifacts - they are listed under the build, e.g. "PR-919/1/".

          It would make sense to have a similar behavior in the Blue Ocean UI, i.e. have the link somewhere on the "activity" page. But a link together with the artifacts would also be useful!

          Anders Pikas added a comment - - edited I have the same problem. No links to the published HTML on Blue Ocean. I'm running Jenkins 2.79, Blue Ocean 1.2.4. Pipeline: publishHTML(target: [allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'doc/internal/html', reportFiles: 'index.html', reportName: 'DOC', reportTitles: ''] ) The link appears in the old UI on the page for e.g. "PR-919/", but not for a particular build, e.g. "PR-919/1/". This is unlike the old UI artifacts - they are listed under the build, e.g. "PR-919/1/". It would make sense to have a similar behavior in the Blue Ocean UI, i.e. have the link somewhere on the "activity" page. But a link together with the artifacts would also be useful!

          Kyle Leinen added a comment -

          apikas, wouldn't you need to set keepAll  to true to get that to happen?

          Kyle Leinen added a comment - apikas , wouldn't you need to set keepAll  to true to get that to happen?

          Michael Neale added a comment -

          I am not actually sure how this feature is meant to work, perhaps jamesdumay can comment when back from vaction sometime? 

          Michael Neale added a comment - I am not actually sure how this feature is meant to work, perhaps jamesdumay can comment when back from vaction sometime? 

          Anders Pikas added a comment -

          kmleinen Yes, keepAll:true makes the HTML appear as a link in the artifact list in Blue Ocean. In the old UI the link appears on the left, both in  "PR-919/", and in "PR-919/1/".

          The documentation says "If checked, archive reports for all successful builds, otherwise only the most recent". So I guess the only drawback of having keepAll set to true is the extra space (in my case 43 MB per build for HTML).

          Anders Pikas added a comment - kmleinen Yes, keepAll:true makes the HTML appear as a link in the artifact list in Blue Ocean. In the old UI the link appears on the left, both in  "PR-919/", and in "PR-919/1/". The documentation says "If checked, archive reports for all successful builds, otherwise only the most recent". So I guess the only drawback of having keepAll set to true is the extra space (in my case 43 MB per build for HTML).

          Liam Newman added a comment -

          jamesdumay vivek 

          Something needs to change here.  Having the user have to use "keepAll:true" to get the item to appear in the artifact list is sufficient to close this bug, I guess, but not great. 

          At minimum there needs to be documentation of this, but that's not great either.  Blue Ocean to tell the user is calling the publishHTML step,  Blue Ocean should give messaging when the publishHTML step is called without this setting that says "keepAll:false is not supported by Blue Ocean".

          Better would be to have links added to the Activity pane for a Pipeline. 

          Liam Newman added a comment - jamesdumay vivek   Something needs to change here.  Having the user have to use "keepAll:true" to get the item to appear in the artifact list is sufficient to close this bug, I guess, but not great.  At minimum there needs to be documentation of this, but that's not great either.  Blue Ocean to tell the user is calling the publishHTML step,  Blue Ocean should give messaging when the publishHTML step is called without this setting that says "keepAll:false is not supported by Blue Ocean". Better would be to have links added to the Activity pane for a Pipeline. 

          Michael Neale added a comment -

          ah hrm - this does seem bad. Not sure of solution though - how does "classic" solve it? Always shows a link to something? 

          Michael Neale added a comment - ah hrm - this does seem bad. Not sure of solution though - how does "classic" solve it? Always shows a link to something? 

            jamesdumay James Dumay
            lewiscowles1986 Lewis Cowles
            Votes:
            31 Vote for this issue
            Watchers:
            35 Start watching this issue

              Created:
              Updated: