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

This issue is archived. You can view it, but you can't modify it. Learn more

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
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: