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

Copy artifacts doesn't copy correct artifacts from given matrix build id

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: copyartifact-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.418
      Copy Artifact Plugin 1.16
    • Similar Issues:

      Description

      I have configured "copy artifacts from another project" in promotion plugin with following settings

      • project name, – a matrix project name 'cneptune-release'
      • which build, – specific build
        • buildnumber, – $PROMOTED_NUMBER (the build I promoted)

      The plugin runs with following logs

      Promoting cneptune-release #26
      [cneptune-release] $ sh -xe /tmp/hudson4956727060021416147.sh
      + rm -rf archives
      + echo PROMOTED_NUMBER=26
      PROMOTED_NUMBER=26
      build hudson.tasks.Shell@74d431a1 SUCCESS
      Copied 1 artifact from cneptune-release » amd64-Debian-4.0 #5
      Copied 1 artifact from cneptune-release » amd64-Debian-5.0 #5
      Copied 1 artifact from cneptune-release » amd64,Debian-4.0 #13
      Copied 1 artifact from cneptune-release » amd64,Debian-5.0 #26
      Copied 0 artifacts from cneptune-release » i386,Debian-4.0 #6
      Copied 0 artifacts from cneptune-release » i386,Debian-5.0 #6
      build hudson.plugins.copyartifact.CopyArtifact@4870fa5b SUCCESS
      

      It should only copy the build with id #26 in the example, not #5, #6, #13.

        Attachments

          Activity

          Hide
          kevincai Kevin Cai added a comment -

          git patch for the fix

          Show
          kevincai Kevin Cai added a comment - git patch for the fix
          Hide
          kevincai Kevin Cai added a comment -

          git patch is attached to fix the problem.

          Show
          kevincai Kevin Cai added a comment - git patch is attached to fix the problem.
          Hide
          kevincai Kevin Cai added a comment -

          A clear fix than previous one

          Show
          kevincai Kevin Cai added a comment - A clear fix than previous one
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: alanharder
          Path:
          src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
          http://jenkins-ci.org/commit/copyartifact-plugin/ceb1ae26c08c759bc282d7417df028489ec072e5
          Log:
          [FIXED JENKINS-10214] use MatrixBuild.getExactRuns when available (core 1.413+)
          to copy artifacts just from matrix configs that were run on that build

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: alanharder Path: src/main/java/hudson/plugins/copyartifact/CopyArtifact.java http://jenkins-ci.org/commit/copyartifact-plugin/ceb1ae26c08c759bc282d7417df028489ec072e5 Log: [FIXED JENKINS-10214] use MatrixBuild.getExactRuns when available (core 1.413+) to copy artifacts just from matrix configs that were run on that build
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_copyartifact #55
          [FIXED JENKINS-10214] use MatrixBuild.getExactRuns when available (core 1.413+)

          alanharder : ceb1ae26c08c759bc282d7417df028489ec072e5
          Files :

          • src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_copyartifact #55 [FIXED JENKINS-10214] use MatrixBuild.getExactRuns when available (core 1.413+) alanharder : ceb1ae26c08c759bc282d7417df028489ec072e5 Files : src/main/java/hudson/plugins/copyartifact/CopyArtifact.java

            People

            • Assignee:
              mindless Alan Harder
              Reporter:
              kevincai Kevin Cai
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: