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

Issue with passing build parameters to Library vars closure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • pipeline

      Basically I can't pass build properties to Library var call without extra nonsense.

      tc_test{
       repo = 'test1'
       folder = 'test2'
       submodules = true
       refs = params.GitCheckout
      }
      

      results in error

      java.lang.NullPointerException: Cannot get property 'GitCheckout' on null object

      This, however, works:

      def a1 = params.GitCheckout
      tc_test{
        repo = 'tc3'
        folder = 'tc3'
        submodules = true
        refs = a1
      }
      

      I'm not really good with groovy, so sorry if it's something obvious.

            Unassigned Unassigned
            trueconf_kiryanov Alexey Kiryanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: