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

ExportXMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • Component/s: pipeline
    • Environment:
      JDK 1.7, jenkins 2.15, pipeline 2.3, pipeline SCM 2.2

      In groovy, it's legal to have a default parameter value be the result of another function. See works-in-groovy.txt attachment.

      In using pipeline, I call load another groovy file (which does a return this at the end). If the default value is the result of another function in the file, any node-context steps then will not run in the loaded file. If I pass a parameter, so the default isn't called, then everything works as expected.

      It's also possible that this has something to do with loading the groovy files from the checkout rather than the original SCM scripts dir?

      If this isn't expected to work, then an error should be raised rather than failing silently, I think.

      In the attachments, test.groovy is the SCM script, and other.groovy is the loaded file.

        1. other.groovy
          0.1 kB
          Karl Mueller
        2. test.groovy
          0.3 kB
          Karl Mueller
        3. works-in-groovy.txt
          0.3 kB
          Karl Mueller

            Assignee:
            Jesse Glick
            Reporter:
            Karl Mueller
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: