copyartifact uses incorrect permalink for promoted build

This issue is archived. You can view it, but you can't modify it. Learn more

      I've got an issue when using CopyArtifact plugin and Promoted builds plugin together.

      I've configured a job with a promoted build parameter,
      and added a step 'copy artifact from another project' to use build version specified by Permalink, and chose Permalink to be a promoted_build_name , not 'lastSuccessfulBuild'.
      (that new dropdown list option has been added by Promoted build plugin).

      When I start this job, I expect my job to copy artifacts from the specific promoted build version.
      Instead, job always copies artifacts from the last successful promoted build.

      Example:
      I started a job and selected promoted build #19 as parameter.
      In the console output I see that latest promoted build #21 artifacts have been copied.

      I see BO_BUILD env variables pointing to correct #19 version,
      and I see COPYARTIFACT_BUILD_NUMBER_ env variable pointing to wrong 21

      I'm tagging both plugins since i'm not sure which one causes this problem.

      Console Output
      =============

      Started by user Administrator
      Building in workspace /var/lib/jenkins/workspace/back_office_deploy_dev
      Copied 1 artifact from "back_office_build" build number 21
      {{[back_office_deploy_dev] $ /bin/sh -xe /tmp/hudson1230681026413612053.sh
      + env
      JENKINS_HOME=/var/lib/jenkins
      MAIL=/var/mail/jenkins
      USER=jenkins
      BO_BUILD_JOBNAME=back_office_build
      NODE_LABELS=master
      HUDSON_URL=http://192.168.117.1:8080/
      SHLVL=1
      HOME=/var/lib/jenkins
      BUILD_URL=http://192.168.117.1:8080/job/back_office_deploy_dev/58/
      LOGNAME=jenkins
      BO_BUILD_RESULT=SUCCESS
      NODE_NAME=master
      EXECUTOR_NUMBER=0
      TERM=xterm
      COPYARTIFACT_BUILD_NUMBER_X=21
      BUILD_ID=58
      BUILD_DISPLAY_NAME=#58
      BUILD_NUMBER=58
      BUILD_TAG=jenkins-back_office_deploy_dev-58
      BO_BUILD.jobName=back_office_build
      BO_BUILD.number=19
      BO_BUILD_NAME=#19
      BO_BUILD_NUMBER=19
      JOB_URL=http://192.168.117.1:8080/job/back_office_deploy_dev/
      BO_BUILD=http://192.168.117.1:8080/job/back_office_build/19/
      HUDSON_HOME=/var/lib/jenkins
      PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
      XDG_RUNTIME_DIR=/run/user/0
      LANG=en_US.UTF-8
      JENKINS_URL=http://192.168.117.1:8080/
      XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
      SHELL=/bin/bash
      JOB_NAME=back_office_deploy_dev
      PWD=/var/lib/jenkins/workspace/back_office_deploy_dev}}

        1. copy-artifacts-plugin-0.png
          copy-artifacts-plugin-0.png
          27 kB
        2. copy-artifacts-plugin.png
          copy-artifacts-plugin.png
          48 kB
        3. a-JobConfig-1.PNG
          a-JobConfig-1.PNG
          81 kB
        4. b-JobConfig-2.PNG
          b-JobConfig-2.PNG
          21 kB
        5. c-RunTwoBuilds.PNG
          c-RunTwoBuilds.PNG
          46 kB
        6. d-PromoteSecondBuildFirst.PNG
          d-PromoteSecondBuildFirst.PNG
          35 kB
        7. e-PromoteSecondBuildFirst-console.PNG
          e-PromoteSecondBuildFirst-console.PNG
          23 kB
        8. f-PromoteFirstBuildLast.PNG
          f-PromoteFirstBuildLast.PNG
          34 kB
        9. g-PromoteFirstBuildLast-console.PNG
          g-PromoteFirstBuildLast-console.PNG
          23 kB
        10. h-JobConfig-3-Workaround.PNG
          h-JobConfig-3-Workaround.PNG
          71 kB

            Assignee:
            Oleg Nenashev
            Reporter:
            Anatoliy D
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: