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

copy artifacts via permalink for promoted builds shows wrong link

      Within the Copy Artifiact plugin you can select "Sepcified by permalink" and after installing the Promoted Builds plugin it lists as the last entry "Latest Promotion ...".

      What I see now as the Latest promotion is the promotion link to the project I'm in, instead of the referenced link specified in the Copy Artifacts from another project's referenced project.

      When I last upgraded Jenkins and the plugins a couple weeks ago this stopped working.

      It looks like a similar bug was reported on 9/9/2012: JENKINS-15086.

          [JENKINS-19007] copy artifacts via permalink for promoted builds shows wrong link

          Jesse Glick added a comment -

          While working on JENKINS-22590 I saw something similar to this but it goes away if you click around a bit; in other words, the problem is related to automatic refreshing of form completions. Probably a Jenkins core bug fixed in later Jenkins versions. Anyway my forthcoming proposed fix of JENKINS-22590 always offers a generic list of permalinks when the upstream job name is not understood, rather than showing permalinks from the current job, which makes no sense.

          Jesse Glick added a comment - While working on JENKINS-22590 I saw something similar to this but it goes away if you click around a bit; in other words, the problem is related to automatic refreshing of form completions. Probably a Jenkins core bug fixed in later Jenkins versions. Anyway my forthcoming proposed fix of JENKINS-22590 always offers a generic list of permalinks when the upstream job name is not understood, rather than showing permalinks from the current job, which makes no sense.

          Sam Wei added a comment -

          I still face similar issue where the permalink only point to the latest job.
          I could not promote any older build version based on their artifact which stored in that particular build.
          @Jesse Glick, it would be nice if some one actually fix this.
          It still happen on version 1.3.0 copy artifacts

          Sam Wei added a comment - I still face similar issue where the permalink only point to the latest job. I could not promote any older build version based on their artifact which stored in that particular build. @Jesse Glick, it would be nice if some one actually fix this. It still happen on version 1.3.0 copy artifacts

          ikedam added a comment -

          Fixed in version 1.31, as in JENKINS-22590.
          Copyartifact 1.31 no longer uses select box, and you can input permalinks manually.

          ikedam added a comment - Fixed in version 1.31, as in JENKINS-22590 . Copyartifact 1.31 no longer uses select box, and you can input permalinks manually.

          Tim Wood added a comment - - edited

          I have Promoted Builds 2.19, Copy Artifact 1.33 and Jenkins 1.567, and I still have this problem. I have been unable to form a permalink that will make Copy Artifacts take the artifact archived as a promoted build. Yet I can form a URL that works to fetch it, e.g.,
          https://myhost/job/MyPromotingJob/promotion/latest/PromotionLabel/artifact/myArtifact.tar.gz
          or
          .../promotion/process/PromotionLabel/lastSuccessfulBuild/artifact/myArtifact.tar.gz

          Even a permalink of
          https://myhost/job/MyPromotingJob/PromotionLabel
          or
          /job/MyPromotingJob/PromotionLabel
          and a file location of
          ../promotion/latest/PromotionLabel/artifact/myArtifact.tar.gz

          doesn't work. Do I have the wrong format for the permalink?

          Tim Wood added a comment - - edited I have Promoted Builds 2.19, Copy Artifact 1.33 and Jenkins 1.567, and I still have this problem. I have been unable to form a permalink that will make Copy Artifacts take the artifact archived as a promoted build. Yet I can form a URL that works to fetch it, e.g., https://myhost/job/MyPromotingJob/promotion/latest/PromotionLabel/artifact/myArtifact.tar.gz or .../promotion/process/PromotionLabel/lastSuccessfulBuild/artifact/myArtifact.tar.gz Even a permalink of https://myhost/job/MyPromotingJob/PromotionLabel or /job/MyPromotingJob/PromotionLabel and a file location of ../promotion/latest/PromotionLabel/artifact/myArtifact.tar.gz doesn't work. Do I have the wrong format for the permalink?

          ikedam added a comment -

          @timwood
          Copyartifact copies an artifact from http://path/to/jenkins/job/MyPromotingJob/PromotionLabel/artifact/myArtifact.txt.
          I think copyartifact cannot copy artifacts archived in promotion processes (I'm not sure as I don't know much about promotions).

          You may trigger a downstream build to archive the artifact from the promotion, and have the copier project copy from that downstream build.

          ikedam added a comment - @timwood Copyartifact copies an artifact from http://path/to/jenkins/job/MyPromotingJob/PromotionLabel/artifact/myArtifact.txt . I think copyartifact cannot copy artifacts archived in promotion processes (I'm not sure as I don't know much about promotions). You may trigger a downstream build to archive the artifact from the promotion, and have the copier project copy from that downstream build.

          Tim Wood added a comment -

          @ikedam Issue https://issues.jenkins-ci.org/browse/JENKINS-15086 contains a suggestion from @nathang which seems to work. It indirects from MyPromotingJob into the sub-job that contains the promoted artifact. I did some head-scratching to figure out the permalink, which was simpler than all my guesses.
          Permalink: PromotionLabel
          Artifact: myArtifact.tar.gz
          (no extraneous path elements needed.) However, I may have found a problem with that code: where it would seem to pick up the latest promotion, I think I found a case where it takes an old one.

          Thanks for the followup.

          Tim Wood added a comment - @ikedam Issue https://issues.jenkins-ci.org/browse/JENKINS-15086 contains a suggestion from @nathang which seems to work. It indirects from MyPromotingJob into the sub-job that contains the promoted artifact. I did some head-scratching to figure out the permalink, which was simpler than all my guesses. Permalink: PromotionLabel Artifact: myArtifact.tar.gz (no extraneous path elements needed.) However, I may have found a problem with that code: where it would seem to pick up the latest promotion, I think I found a case where it takes an old one. Thanks for the followup.

            Unassigned Unassigned
            joshuaayson Joshua Ayson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: