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

[Pipeline] Some non-CPS transformable code will not throw errors

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Component/s: workflow-cps-plugin
    • Labels:
      None
    • Environment:
      CloudBees Jenkins Enterprise 2.7.19.1-rolling
      Workflow CPS plugin 2.23
    • Similar Issues:

      Description

      The groovy cps documentation does warn that some loop constructs are not cps transformable.
      However, when they are used, they will behave incorrectly (and silently) rather than throwing an error.

      repro case

      println (["dog", "cat"].findAll{it.contains("dog")})
      

      In a regular groovy shell, this will return ["dog"], as you would expect. In a pipeline job, this will return true.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ssutherland Sean Sutherland
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: