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

Show link to promotion jobs archived artifacts

    Details

    • Similar Issues:

      Description

      I have a script that copies some QA test results (simple txt files) to the local workspace, and then I have a build action that archives these txt files.

      The only way I can view these archived artifacts is to manually enter 'artifact/' on the end of the promoted job url, like so:
      http://jenkins/view/job_view/job/job_name/77/promotion/QA%20Fail/promotionBuild/1/artifact/test_results/

      Right now the default page is just the console log, would it be possible to add multiple job-related links the left-hand side, similar to the parent job that was promoted? This would make it a heck of a lot easier to find the artifacts for each promoted build.

        Attachments

          Activity

          Hide
          devin_linnington Devin Linnington added a comment -

          The work around for this is to use the PROMOTED_* variables to figure out where the main jobs archive is, then move whatever files there:

          archive_dir="${jenkins_dir}/${PROMOTED_JOB_NAME}/builds/${PROMOTED_NUMBER}/archive/"
          if [ -d "$archive_dir" ]; then
          	mv test_results $archive_dir
          else
          	echo "#### Error: archive directory does not exist"
          fi
          

          This is actually better for my users than the original idea, so feel free to close this if you wish.

          -Devin

          Show
          devin_linnington Devin Linnington added a comment - The work around for this is to use the PROMOTED_* variables to figure out where the main jobs archive is, then move whatever files there: archive_dir= "${jenkins_dir}/${PROMOTED_JOB_NAME}/builds/${PROMOTED_NUMBER}/archive/" if [ -d "$archive_dir" ]; then mv test_results $archive_dir else echo "#### Error: archive directory does not exist" fi This is actually better for my users than the original idea, so feel free to close this if you wish. -Devin
          Hide
          mauromol Mauro Molinari added a comment - - edited

          I think I've the same problem: when I add an action to a manual promotion to archive artifacts, I don't see any element in the Jenkins UI with which I can reach the archived artifacts.
          Having named "Release" such a promotion job, looking at the server file system the archived artifacts are placed in ~/jobs/<project name>/promotions/Release.

          Could this be fixed? I don't want to archive the artifacts for ANY build, but only for the promoted ones. And if the archived artifacts are not reachable from within Jenkins, the archive functionality is quite useless.

          Show
          mauromol Mauro Molinari added a comment - - edited I think I've the same problem: when I add an action to a manual promotion to archive artifacts, I don't see any element in the Jenkins UI with which I can reach the archived artifacts. Having named "Release" such a promotion job, looking at the server file system the archived artifacts are placed in ~/jobs/<project name>/promotions/Release . Could this be fixed? I don't want to archive the artifacts for ANY build, but only for the promoted ones. And if the archived artifacts are not reachable from within Jenkins, the archive functionality is quite useless.
          Hide
          sleaker Nick minkler added a comment - - edited

          This should actually be considered a bug. It's a breaking functionality when dealing with promotions and slaves, as there's no way to produce a working link for a build artifact that is only archived during a promotion. The UI clearly accepts this as a valid setup, and all other artifact archiving format methods produce valid links and are expected to do so. However this does not. None of the 'workarounds' listed work for dealing with slaves either, as the artifact is transfered to the master in our setup but any attempts to browse through the job site don't work, and you can't run a script to copy the artifact down a couple directories to have it show up as they need to be present on the master, not the slave where the workspace is located.

          Show
          sleaker Nick minkler added a comment - - edited This should actually be considered a bug. It's a breaking functionality when dealing with promotions and slaves, as there's no way to produce a working link for a build artifact that is only archived during a promotion. The UI clearly accepts this as a valid setup, and all other artifact archiving format methods produce valid links and are expected to do so. However this does not. None of the 'workarounds' listed work for dealing with slaves either, as the artifact is transfered to the master in our setup but any attempts to browse through the job site don't work, and you can't run a script to copy the artifact down a couple directories to have it show up as they need to be present on the master, not the slave where the workspace is located.
          Hide
          versaleszett Versal Eszett added a comment - - edited

          Peter Hayes, is there any update to this? I just stumbled over this issue, as far as I can see there's still no easy way to get the artifacts of the promotion job/build.

          It would be really nice if this feature could be considered in a future version.

          Show
          versaleszett Versal Eszett added a comment - - edited Peter Hayes , is there any update to this? I just stumbled over this issue, as far as I can see there's still no easy way to get the artifacts of the promotion job/build. It would be really nice if this feature could be considered in a future version.
          Hide
          versaleszett Versal Eszett added a comment -

          Oleg Nenashev, seems like the current assignee is unavailable at the moment. Could you maybe have a look? Thanks!

          Show
          versaleszett Versal Eszett added a comment - Oleg Nenashev , seems like the current assignee is unavailable at the moment. Could you maybe have a look? Thanks!
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Versal Eszett yes, the former maintainer does not work on this plugin anymore. Regarding myself, I am fully snowed under JEP-200, core commitments and Remoting stuff, so I would not expect that I work on this issue in next 6 months at least (and maybe I will have to abandon this plugin). I will be happy to review pull requests though

          Show
          oleg_nenashev Oleg Nenashev added a comment - Versal Eszett yes, the former maintainer does not work on this plugin anymore. Regarding myself, I am fully snowed under JEP-200, core commitments and Remoting stuff, so I would not expect that I work on this issue in next 6 months at least (and maybe I will have to abandon this plugin). I will be happy to review pull requests though
          Hide
          ts_dvanvelzen Dinand Vanvelzen added a comment -

          We rely on the promoted builds plugin as well in our CI/CD flow to sign off on certified builds.
          We ran into this issue and had no way to directly provide access to the artifacts via Jenkins itself.

          It was worked around by creating another project that will hold the artifacts and having the promotion process merely trigger (with param) the next level project. This next level project would then copy the artifacts from the promotion-triggering-project and do whatever you had in the original promotion build steps. Not the most elegant solution and may not work for all cases, but for us it gets the job done until this issue is resolved.

           

          Also see this:

          https://stackoverflow.com/questions/21189990/copy-artifacts-from-specific-promoted-build

           

          Show
          ts_dvanvelzen Dinand Vanvelzen added a comment - We rely on the promoted builds plugin as well in our CI/CD flow to sign off on certified builds. We ran into this issue and had no way to directly provide access to the artifacts via Jenkins itself. It was worked around by creating another project that will hold the artifacts and having the promotion process merely trigger (with param) the next level project. This next level project would then copy the artifacts from the promotion-triggering-project and do whatever you had in the original promotion build steps. Not the most elegant solution and may not work for all cases, but for us it gets the job done until this issue is resolved.   Also see this: https://stackoverflow.com/questions/21189990/copy-artifacts-from-specific-promoted-build  

            People

            • Assignee:
              Unassigned
              Reporter:
              devin_linnington Devin Linnington
            • Votes:
              8 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated: