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

Parameter references not using params.NAME retained across Replay

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None

      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 

       

       

          [JENKINS-49794] Parameter references not using params.NAME retained across Replay

          valentina armenise created issue -
          valentina armenise made changes -
          Component/s New: workflow-job-plugin [ 21716 ]
          valentina armenise made changes -
          Description Original: 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 

           

           
          New: 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 

           

           
          valentina armenise made changes -
          Attachment New: Screen Shot 2018-02-28 at 15.12.16.png [ 41626 ]
          Jesse Glick made changes -
          Summary Original: BooleanParam default value is always true New: Parameter references not using params.NAME retained across Replay
          Jesse Glick made changes -
          Component/s New: workflow-cps-plugin [ 21713 ]
          Component/s Original: pipeline [ 21692 ]
          Component/s Original: workflow-job-plugin [ 21716 ]

            Unassigned Unassigned
            varmenise valentina armenise
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: