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

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

              Created:
              Updated:
              Resolved: