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

BooleanParam default value is always true

    Details

    • Similar Issues:

      Description

      My pipeline defines a parameter with sth like:

       

      parameters {
       booleanParam(name: 'RUN_TESTS', defaultValue: false, description: 'Do you want to run the build with tests?')
       }

       

      Printing the param value with

      script {
       if (params.RUN_TESTS) {
       echo "true: $RUN_TESTS"
       }
       else echo "false: $RUN_TESTS"
       }

      shows that the value is always TRUE and the tests are always executed.

       I think this is somewhat related to https://issues.jenkins-ci.org/browse/JENKINS-36543 

       

       

        Attachments

          Activity

          varmenise valentina armenise created issue -
          varmenise valentina armenise made changes -
          Field Original Value New Value
          Component/s workflow-job-plugin [ 21716 ]
          varmenise valentina armenise made changes -
          Description My pipeline defines a parameter with sth like:

           

           
          {noformat}
          parameters {
           booleanParam(name: 'RUN_TESTS', defaultValue: false, description: 'Do you want to run the build with tests?')
           }{noformat}
           

           

          Printing the param value with
          {code:java}
          script {
           if (params.RUN_TESTS) {
           echo "true: $RUN_TESTS"
           }
           else echo "false: $RUN_TESTS"
           }{code}
          shows that the value is always TRUE and the tests are always executed.

           

          I think this is somewhat related to 

          I think this is somewhat related to https://issues.jenkins-ci.org/browse/JENKINS-36543 

           

           
          My pipeline defines a parameter with sth like:

           
          {noformat}
          parameters {
           booleanParam(name: 'RUN_TESTS', defaultValue: false, description: 'Do you want to run the build with tests?')
           }{noformat}
           

          Printing the param value with
          {code:java}
          script {
           if (params.RUN_TESTS) {
           echo "true: $RUN_TESTS"
           }
           else echo "false: $RUN_TESTS"
           }{code}
          shows that the value is always TRUE and the tests are always executed.

           I think this is somewhat related to https://issues.jenkins-ci.org/browse/JENKINS-36543 

           

           
          varmenise valentina armenise made changes -

            People

            • Assignee:
              Unassigned
              Reporter:
              varmenise valentina armenise
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: