Support tuple in Pipeline

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

XMLWordPrintable

      Fresh install of Jenkins 2.7.4, with Pipeline installed (attached about.md)

      Using Groovy tuple expressions in Pipeline currently throws:

      Started by user anonymous
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      General error during canonicalization: java.lang.UnsupportedOperationException
      
      java.lang.UnsupportedOperationException
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
      	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
      

      Full console output attached.

      Sample Pipeline to reproduce the issue:

      def tupleFunc() {
          ["a","b"]
      }
      
      node {
          (tA, tB) = tupleFunc()
          
          echo "tA: $tA"
          echo "tb: $tB"
      }
      

        1. about.md
          5 kB
        2. console.log
          44 kB

            Assignee:
            Unassigned
            Reporter:
            Owen Wood
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: