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

Boolean parameters injected as String

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Consider the following workflow script:

      echo "bool=$bool"
      echo bool.getClass().toString()

      Output:

      Started by user Jos Backus
      Running: Print Message
      bool=false
      Running: Print Message
      class java.lang.String
      Running: End of Workflow
      Finished: SUCCESS

      I would expect the name of the class to be java.lang.Boolean, not java.lang.String. This forces one to add lines such as:

      bool = bool == 'true'

        Attachments

          Issue Links

            Activity

            josb Jos Backus created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is duplicated by JENKINS-27388 [ JENKINS-27388 ]
            jglick Jesse Glick made changes -
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            Summary Boolean parameters injected as Strings into Groovy Workflow Plugin environment Boolean parameters injected as String
            jglick Jesse Glick made changes -
            Link This issue is blocking JENKINS-27413 [ JENKINS-27413 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-29952 [ JENKINS-29952 ]
            jglick Jesse Glick made changes -
            Link This issue is related to SECURITY-170 [ SECURITY-170 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-30222 [ JENKINS-30222 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-30519 [ JENKINS-30519 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-30222 [ JENKINS-30222 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-34101 [ JENKINS-34101 ]
            jglick Jesse Glick made changes -
            Epic Link JENKINS-35394 [ 171187 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-35698 [ JENKINS-35698 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 161500 ] JNJira + In-Review [ 180721 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Component/s workflow-cps-plugin [ 21713 ]
            Component/s pipeline [ 21692 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 60 (Web Link)" [ 14843 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-65 (Web Link)" [ 19248 ]

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              josb Jos Backus
              Votes:
              1 Vote for this issue
              Watchers:
              15 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: