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

NodeLabel parameter not working inside workflow

    Details

    • Similar Issues:

      Description

      1. Install the nodelabel parameter plugin, and workflow plugin
      2. create a workflow, with one string parameter (STRING_PARAM1), and one node parameter (NODE_PARAM1)
      3. create a workflow like this:
        node {
           echo STRING_PARAM1
           echo NODE_PARAM1
        }
        

      If you run this workflow, you will get an error:

      groovy.lang.MissingPropertyException: No such property: NODE_PARAM1 for class: WorkflowScript
      

      The problem is that the NodeLabel parameter plugin overrides buildEnvVars which was deprecated in Jenkins 1.344: see http://javadoc.jenkins-ci.org/hudson/model/ParameterValue.html#buildEnvVars%28hudson.model.AbstractBuild,%20java.util.Map%29

      It needs to override buildEnvironment(). This is similar to the problem in JENKINS-27718

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                domi Dominik Bartholdi
                Reporter:
                rodrigc Craig Rodrigues
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: