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

Support tuple in Pipeline

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None

      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
          Owen Wood
        2. console.log
          44 kB
          Owen Wood

            Unassigned Unassigned
            owood Owen Wood
            Votes:
            15 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: