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

Unable to get value of label parameter in jenkins pipeline as a variable

XMLWordPrintable

      We are uanble to get value of the label parameter as variable when used in the jenkins pipeline 

      Here we are declaring TEST_CLIENT as the label parameter in jenkins. When we try to use it the value of label parameter is null in the parameter 

      using it as 

      pipeline {
      agent {
      node

      { label "$TEST_CLIENT" }

      }

       

      When trying to echo the value of Label Parameter is null using env and params

      ========================================
      env.TEST_CLIENT: class org.codehaus.groovy.runtime.NullObject
      [Pipeline] echo
      params.TEST_CLIENT: class org.codehaus.groovy.runtime.NullObject

            Unassigned Unassigned
            viprabhatia Vipra Bhatia
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: