• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline

      If you have a Java object array (as opposed to a list, as with typical Groovy code) and try to pass it as an argument to a CPS-transformed method, only the first element arrives, rather than an array.

      Workarounds:

      • wrap the array in Arrays.asList before passing it, and treat the argument as a List
      • annotate the method as @NonCPS (assuming it is not calling any steps)

          [JENKINS-32062] Arrays may not be passed directly to methods

          Jesse Glick created issue -
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "groovy-cps PR 20 (Web Link)" [ 13599 ]

          Jesse Glick added a comment -

          Released groovy-cps 1.6; need to wait for it to synch to Central, then try using from workflow-cps and clean up a couple of TODOs (e.g., use new printStackTrace method).

          Jesse Glick added a comment - Released groovy-cps 1.6; need to wait for it to synch to Central, then try using from workflow-cps and clean up a couple of TODOs (e.g., use new printStackTrace method).
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-29990 [ JENKINS-29990 ]

          Jesse Glick added a comment -

          OSSRH release did not work. Retried; waiting again.

          Jesse Glick added a comment - OSSRH release did not work. Retried; waiting again.
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 295 (Web Link)" [ 13741 ]

          Code changed in jenkins
          User: Jesse Glick
          Path:
          CHANGES.md
          cps/pom.xml
          http://jenkins-ci.org/commit/workflow-plugin/4cbff8ccdd6cf1e9f5cd2e7eb87524ef673a143a
          Log:
          [FIXED JENKINS-32062] Integrate groovy-cps 1.6 with several fixes.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: CHANGES.md cps/pom.xml http://jenkins-ci.org/commit/workflow-plugin/4cbff8ccdd6cf1e9f5cd2e7eb87524ef673a143a Log: [FIXED JENKINS-32062] Integrate groovy-cps 1.6 with several fixes.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

          Code changed in jenkins
          User: Jesse Glick
          Path:
          CHANGES.md
          cps/pom.xml
          http://jenkins-ci.org/commit/workflow-plugin/97ce55c78e776242adf56d917ed2ee3bd40b46d6
          Log:
          Merge pull request #295 from jglick/groovy-cps-JENKINS-32062

          JENKINS-32062 Integrate groovy-cps 1.6

          Compare: https://github.com/jenkinsci/workflow-plugin/compare/92fe988e8909...97ce55c78e77

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: CHANGES.md cps/pom.xml http://jenkins-ci.org/commit/workflow-plugin/97ce55c78e776242adf56d917ed2ee3bd40b46d6 Log: Merge pull request #295 from jglick/groovy-cps- JENKINS-32062 JENKINS-32062 Integrate groovy-cps 1.6 Compare: https://github.com/jenkinsci/workflow-plugin/compare/92fe988e8909...97ce55c78e77

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: