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

Workflow build Parameters are not exposed to CopyArtifact

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: copyartifact-plugin
    • Labels:
    • Environment:
      Jenkins 1.598 on Linux
      Workflow:Aggregator plugin 1.2
      CopyArtifact plugin: 1.34
    • Similar Issues:

      Description

      If I use the CopyArtifact plugin with a workflow step(), it correctly pulls the latest successful build's artifacts when pointed to a project of type Workflow.

      However, if I specify parameters for that same project, it will always throw an AbortException saying no build with those parameters could be found, regardless of what I entered in.

      If I change the CopyArtifact to point to a freestyle project, the parameters correctly work as intended, pulling in most recent build that had those parameters.

      Since the CopyArtifact is behaving as it should, I'm assuming there's a flaw in how the Workflow plugin is exposing its build Parameters.

      Sample code:

      step ([$class: 'CopyArtifact',
             projectName: 'Test Run Composer',
             target: 'composer_run',
             parameters: "PRODUCT=test,BRANCH_NAME=$branch_name"
            ]);
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
            http://jenkins-ci.org/commit/copyartifact-plugin/abd5a3067a3a0769115cd73716978545ff7892bc
            Log:
            JENKINS-26694 Added a test to reproduce JENKINS-26694.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/abd5a3067a3a0769115cd73716978545ff7892bc Log: JENKINS-26694 Added a test to reproduce JENKINS-26694 .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/ParametersBuildFilter.java
            http://jenkins-ci.org/commit/copyartifact-plugin/53462816b1d9f3455a3422d89bc5d6feaff274f1
            Log:
            [FIXED JENKINS-26694] ParameterBuildFilter now works also for WorkflowRun.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/ParametersBuildFilter.java http://jenkins-ci.org/commit/copyartifact-plugin/53462816b1d9f3455a3422d89bc5d6feaff274f1 Log: [FIXED JENKINS-26694] ParameterBuildFilter now works also for WorkflowRun.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
            src/test/java/hudson/plugins/copyartifact/CopyArtifactWorkflowTest.java
            http://jenkins-ci.org/commit/copyartifact-plugin/1308f8da0170ff3010054417bdcf5d88bd536df4
            Log:
            JENKINS-26694 Make tests succeed on Windows: HudsonTestCase using workflow-1.1 fails for JENKINS-26030.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java src/test/java/hudson/plugins/copyartifact/CopyArtifactWorkflowTest.java http://jenkins-ci.org/commit/copyartifact-plugin/1308f8da0170ff3010054417bdcf5d88bd536df4 Log: JENKINS-26694 Make tests succeed on Windows: HudsonTestCase using workflow-1.1 fails for JENKINS-26030 .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/ParametersBuildFilter.java
            src/test/java/hudson/plugins/copyartifact/CopyArtifactWorkflowTest.java
            http://jenkins-ci.org/commit/copyartifact-plugin/7802e455a2479f545e5f7fa58d1ca6fdd8871028
            Log:
            Merge pull request #59 from ikedam/feature/JENKINS-26694_ParametersBuildFilterForWorkflow

            JENKINS-26694 Make ParameterBuildFilter applicable to WorkflowJobs.

            Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/ec41cbdd914d...7802e455a247

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/ParametersBuildFilter.java src/test/java/hudson/plugins/copyartifact/CopyArtifactWorkflowTest.java http://jenkins-ci.org/commit/copyartifact-plugin/7802e455a2479f545e5f7fa58d1ca6fdd8871028 Log: Merge pull request #59 from ikedam/feature/ JENKINS-26694 _ParametersBuildFilterForWorkflow JENKINS-26694 Make ParameterBuildFilter applicable to WorkflowJobs. Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/ec41cbdd914d...7802e455a247
            Hide
            ikedam ikedam added a comment -

            Fixed in copyartifact-1.35.
            It will be available in a day. Please try that.

            Show
            ikedam ikedam added a comment - Fixed in copyartifact-1.35. It will be available in a day. Please try that.

              People

              • Assignee:
                ikedam ikedam
                Reporter:
                jamesvl James VL
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: