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

Artifacts tab in blue ocean does not have link to view an artifact

    Details

    • Similar Issues:
    • Released As:
      1.15.0

      Description

      if I go to the Artifacts tab in blue ocean, I can see the artifacts.

      However, for each artifact I can only download the artifact.

      On the legacy UI, there was a link to view the artifact as well.

      For example https://myjenkins/jobname/29/artifact/somefile.txt will download the artifact

      https://myjenkins/jobname/29/artifact/somefile.txt/*view*/

      will view it in the browser.
      I use that feature a lot because I archive certain log files during test runs which are handy to view in the browser.

        Attachments

          Activity

          rodrigc Craig Rodrigues created issue -
          Hide
          borisivan boris ivan added a comment -

          I've always had mixed results re: that working even in the legacy UI, and found that it was client/chrome related, re: displaying the content vs downloading.

          I mention this because it's working for me right now with blueocean. If I click "artifacts" I see a list of 3 items: pipeline.log, and two .png files generated as screenshots from UI testing, that I publish with the 'archive the artifacts' functionality. Each of those 3 items is a link itself as far as the "filename" is concerned, To the right of the filename is size, and to the right of that is the icon/link (down arrow) for downloading. Each work as expected for me – clicking on the "filename" displays the object in the browser in a new tab pipeline.log shows all the build text, and the two .png files show the picture. If I click the download icon it will download it.

          Show
          borisivan boris ivan added a comment - I've always had mixed results re: that working even in the legacy UI, and found that it was client/chrome related, re: displaying the content vs downloading. I mention this because it's working for me right now with blueocean. If I click "artifacts" I see a list of 3 items: pipeline.log, and two .png files generated as screenshots from UI testing, that I publish with the 'archive the artifacts' functionality. Each of those 3 items is a link itself as far as the "filename" is concerned, To the right of the filename is size, and to the right of that is the icon/link (down arrow) for downloading. Each work as expected for me – clicking on the "filename" displays the object in the browser in a new tab pipeline.log shows all the build text, and the two .png files show the picture. If I click the download icon it will download it.
          Hide
          rodrigc Craig Rodrigues added a comment -

          The behavior of the browser is determined by what the server sends back in the HTTP Content-Type field,

          and also the internal list of mime-types in the browser.

          If you appends */view/* to a URL, it triggers this behavior in Jenkins:

          https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/DirectoryBrowserSupport.java#L308

          It sets a pseudo-name to plain.txt, so that tricks the browser into trying to render the file in the browser.

          In my artifacts directory, I generate a lot of YAML files ending with .yml extension, so I want to be able to view them in the browser just like in the legacy UI, in addition to being able to download them.

          Show
          rodrigc Craig Rodrigues added a comment - The behavior of the browser is determined by what the server sends back in the HTTP Content-Type field, and also the internal list of mime-types in the browser. If you appends */ view /* to a URL, it triggers this behavior in Jenkins: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/DirectoryBrowserSupport.java#L308 It sets a pseudo-name to plain.txt , so that tricks the browser into trying to render the file in the browser. In my artifacts directory, I generate a lot of YAML files ending with .yml extension, so I want to be able to view them in the browser just like in the legacy UI, in addition to being able to download them.
          rodrigc Craig Rodrigues made changes -
          Field Original Value New Value
          Assignee Craig Rodrigues [ rodrigc ]
          rodrigc Craig Rodrigues made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Show
          rodrigc Craig Rodrigues added a comment - Patch submitted:  https://github.com/jenkinsci/blueocean-plugin/pull/1951
          halkeye Gavin Mogan made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Released As 1.15.0

            People

            • Assignee:
              rodrigc Craig Rodrigues
              Reporter:
              rodrigc Craig Rodrigues
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: