title: how to pass a variable from outside the stage in jenkins pipeline
body: <p>I have set an env variable "status" as true and when executing below code test2 stage is getting skipped even though I declared the env status as true. can anyone help me on this to proceed further</p>
  
  <p>using Jenkins version 2.150 and its a pipeline script</p>
  
  <pre><code>pipeline {
  
      agent any
      environment{
          STATUS='TRUE'
      }
      stages {
          stage('test1') {
              steps {
                  echo 'test1'
              }
          }
  
          stage('test2') {
              when{
                  expression {
                      STATUS = 'TRUE'
                  }
              }
              steps {
                  input message: 'Push to env', ok: 'GO!!'
              }
          }
  
      }
  }
  </code></pre>