title: How to write conditional step with boolean parameter in jenkins scripted pipeline job?
body: <p>This condition in my script always gets evaluated as <strong>true</strong> and prints "Yes equal - running the stage"  </p>
  
  <pre><code>stage('test cond'){  
      if(env.BUILD_TESTING2 == true){  
          echo "Yes equal - running the stage"
      } else {
          echo "Not equal - skipping the stage"
      }
  }  
  </code></pre>
  
  <p>Even if I start the build by setting env.BUILD_TESTING2 = <strong>false</strong> it still enters the condition and prints "Yes equal - running the stage".  </p>
  
  <p>I also tried this syntax:  </p>
  
  <pre><code>stage('test cond'){  
      if(env.BUILD_TESTING2){  
          echo "Yes equal - running the stage"
      } else {
          echo "Not equal - skipping the stage"
      }
  }
  </code></pre>
  
  <p>But it also still always gets evaluated as <strong>true</strong>.  </p>
  
  <p>How can I write a conditional step with boolean parameter in Jenkins scripted pipeline ?</p>