title: How to mark Jenkins' job stage as skipped, for scripted pipeline
body: <p>How do I mark a stage as skipped when using <strong>scripted pipeline</strong>. 
  I have no problem skipping a stage in declarative pipeline. I just set </p>
  
  <pre><code>when {
    expression {&lt;some boolean expression&gt;}
  
  }
  </code></pre>
  
  <p>And if the expression is evaluate to false that stage is skipped.
  <a href="https://i.stack.imgur.com/LjaAD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LjaAD.png" alt="enter image description here"></a></p>
  
  <p>The problem is that if you try to do this with <strong>scrippted pipeline</strong> you get:</p>
  
  <pre><code>java.lang.NoSuchMethodError: No such DSL method 'when' found among steps
  </code></pre>
  
  <p>error message. This is because the DSL of declarative pipeline is not the same as <strong>scripted pipeline</strong> 
    So, how can it be done?</p>