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

Build parameter not expanded in script path

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Steps to reproduce

      1. Create a pipeline job
      2. Add a build parameter to specify the URL of a git repository, ${gitUrl}
      3. Add a build parameter to specify the build script to execute, ${script}
      4. Within the Pipeline section
        1. Select "Pipeline script from SCM"
        2. Select "Git" for the SCM
        3. Enter ${gitUrl} for the Repository URL
        4. Enter the branch to build
        5. Enter ${script} for the "Script Path"

      Perform a "Build with Parameters" and enter values for the gitUrl and script values and select Build.  The following error is reported

      Mar 16, 2017 2:43:53 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
      INFO: Worker #4 completed: FAILURE
      Mar 16, 2017 2:43:53 PM org.jenkinsci.plugins.workflow.flow.FlowExecutionList unregister
      WARNING: Owner[Worker/4:Worker #4] was not in the list to begin with: []
      Mar 16, 2017 2:43:53 PM io.jenkins.blueocean.events.PipelineEventListener$1 run
      SEVERE: Unexpected error publishing pipeline FlowNode event.
      java.util.concurrent.ExecutionException: hudson.AbortException: /var/jenkins_home/workspace/Worker@script/${script} not found
      at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:289)
      at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:276)
      at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:111)
      at io.jenkins.blueocean.events.PipelineEventListener$1.run(PipelineEventListener.java:226)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: hudson.AbortException: /var/jenkins_home/workspace/Worker@script/${script} not found
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:136)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:59)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:232)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)
      

      If ${script} is set to the location of a script, the job starts successfully.

        Attachments

          Issue Links

            Activity

            bkeyser_dgi Brian Keyser created issue -
            bkeyser_dgi Brian Keyser made changes -
            Field Original Value New Value
            Description Steps to reproduce
             # Create a pipeline job
             # Add a build parameter to specify the URL of a git repository, $\{gitUrl}
             # Add a build parameter to specify the build script to execute, $\{script}
             # Within the Pipeline section
             ## Select "Pipeline script from SCM"
             ## Select "Git" for the SCM
             ## Enter $\{gitUrl} for the Repository URL
             ## Enter the branch to build
             ## Enter $\{script) for the "Script Path"

            Perform a "Build with Parameters" and enter values for the gitUrl and script values and select Build.  The following error is reported
            {code:java}
            Mar 16, 2017 2:43:53 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: Worker #4 completed: FAILURE
            Mar 16, 2017 2:43:53 PM org.jenkinsci.plugins.workflow.flow.FlowExecutionList unregister
            WARNING: Owner[Worker/4:Worker #4] was not in the list to begin with: []
            Mar 16, 2017 2:43:53 PM io.jenkins.blueocean.events.PipelineEventListener$1 run
            SEVERE: Unexpected error publishing pipeline FlowNode event.
            java.util.concurrent.ExecutionException: hudson.AbortException: /var/jenkins_home/workspace/Worker@script/${script} not found
            at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:289)
            at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:276)
            at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:111)
            at io.jenkins.blueocean.events.PipelineEventListener$1.run(PipelineEventListener.java:226)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)
            Caused by: hudson.AbortException: /var/jenkins_home/workspace/Worker@script/${script} not found
            at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:136)
            at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:59)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:232)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            {code}
            If $\{script} is set to the location of a script, the job starts successfully.
            Steps to reproduce
             # Create a pipeline job
             # Add a build parameter to specify the URL of a git repository, $\{gitUrl}
             # Add a build parameter to specify the build script to execute, $\{script}
             # Within the Pipeline section
             ## Select "Pipeline script from SCM"
             ## Select "Git" for the SCM
             ## Enter $\{gitUrl} for the Repository URL
             ## Enter the branch to build
             ## Enter $\{script} for the "Script Path"

            Perform a "Build with Parameters" and enter values for the gitUrl and script values and select Build.  The following error is reported
            {code:java}
            Mar 16, 2017 2:43:53 PM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
            INFO: Worker #4 completed: FAILURE
            Mar 16, 2017 2:43:53 PM org.jenkinsci.plugins.workflow.flow.FlowExecutionList unregister
            WARNING: Owner[Worker/4:Worker #4] was not in the list to begin with: []
            Mar 16, 2017 2:43:53 PM io.jenkins.blueocean.events.PipelineEventListener$1 run
            SEVERE: Unexpected error publishing pipeline FlowNode event.
            java.util.concurrent.ExecutionException: hudson.AbortException: /var/jenkins_home/workspace/Worker@script/${script} not found
            at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:289)
            at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:276)
            at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:111)
            at io.jenkins.blueocean.events.PipelineEventListener$1.run(PipelineEventListener.java:226)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)
            Caused by: hudson.AbortException: /var/jenkins_home/workspace/Worker@script/${script} not found
            at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:136)
            at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:59)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:232)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            {code}
            If $\{script} is set to the location of a script, the job starts successfully.
            bkeyser_dgi Brian Keyser made changes -
            Component/s git-plugin [ 15543 ]
            Component/s scm-api-plugin [ 18054 ]
            abayer Andrew Bayer made changes -
            Link This issue duplicates JENKINS-43040 [ JENKINS-43040 ]
            abayer Andrew Bayer made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]
            jglick Jesse Glick made changes -
            Resolution Duplicate [ 3 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            jglick Jesse Glick made changes -
            Component/s workflow-cps-plugin [ 21713 ]
            Component/s git-plugin [ 15543 ]
            Component/s pipeline [ 21692 ]
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            jglick Jesse Glick made changes -
            Status Reopened [ 4 ] Open [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-28447 [ JENKINS-28447 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-44073 [ JENKINS-44073 ]
            shaburov Oleg Shaburov made changes -
            Attachment image-2017-10-24-18-29-24-153.png [ 40098 ]
            shaburov Oleg Shaburov made changes -
            Attachment image-2017-10-24-18-31-29-887.png [ 40099 ]
            abayer Andrew Bayer made changes -
            Assignee Andrew Bayer [ abayer ]
            abayer Andrew Bayer made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR #197 (Web Link)" [ 19779 ]
            abayer Andrew Bayer made changes -
            Link This issue relates to JENKINS-42971 [ JENKINS-42971 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-38439 [ JENKINS-38439 ]
            abayer Andrew Bayer made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]

              People

              Assignee:
              abayer Andrew Bayer
              Reporter:
              bkeyser_dgi Brian Keyser
              Votes:
              13 Vote for this issue
              Watchers:
              26 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: