[JIRA] [copyartifact-plugin] (JENKINS-33476) copyatrifact uses incorrect permalink for promoted build

71 views
Skip to first unread message

anatolijd@gmail.com (JIRA)

unread,
Mar 11, 2016, 6:58:04 AM3/11/16
to jenkinsc...@googlegroups.com
Anatoliy D created an issue
 
Jenkins / Bug JENKINS-33476
copyatrifact uses incorrect permalink for promoted build
Issue Type: Bug Bug
Assignee: Oleg Nenashev
Attachments: copy-artifacts-plugin-0.png, copy-artifacts-plugin.png
Components: copyartifact-plugin, promoted-builds-plugin
Created: 11/Mar/16 11:57 AM
Environment: Jenkins ver. 1.650
Copy Artifact Plugin 1.37
Promoted builds plugin 2.25
Labels: plugins
Priority: Minor Minor
Reporter: Anatoliy D

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}}

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

devld@ikedam.jp (JIRA)

unread,
Mar 12, 2016, 2:36:02 AM3/12/16
to jenkinsc...@googlegroups.com
ikedam commented on Bug JENKINS-33476
 
Re: copyatrifact uses incorrect permalink for promoted build

I could not reproduce the issue in my environment.
Please report detailed steps to reproduce the issue.

Tested with Jenkins 1.650, Copyartifact 1.37, Promoted Builds 2.25

  1. Create a freestyle project "copiee"
    • Promotes builds when
      • Name: promoted
      • Criteria: Only when manually approved
    • Execute shell
      export >artifact.txt
      
    • Archive the artifacts
      • Files to archive: artifact.txt
  2. Run "copiee" twice
      • copiee #1 and copiee #2 is created.
  3. Promote copiee #1.
  4. Create a freestyle project "copier"
    • This build is parameterized
      • Promoted Build Parameter
        • Name: PROMOTED_BUILD
        • Job Name: copiee
        • Promotion: promoted
    • Copy artifacts from another project
      • Project name: copiee
      • Which build: Specified by permalink
        • Permalinik: promoted
      • Artifacts to copy: artifact.txt
    • Execute shell
      echo "variables in this build ****************************"
      export
      echo "variables in the upstream build ****************************"
      cat artifact.txt
      

Result:

  • Copied artifacts from copiee #1
    Copied 1 artifact from "copiee" build number 1
    

devld@ikedam.jp (JIRA)

unread,
Apr 16, 2016, 9:23:01 PM4/16/16
to jenkinsc...@googlegroups.com
ikedam resolved as Cannot Reproduce
 
Change By: ikedam
Status: Open Resolved
Resolution: Cannot Reproduce
Reply all
Reply to author
Forward
0 new messages