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

Issue with passing build parameters to Library vars closure

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: pipeline
    • Labels:
    • Environment:
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: