title: How to manipulate the build result of a Jenkins pipeline job (back to 'SUCCESS')?
body: <p>I'm having some trouble to manipulate the build result of a Jenkins pipeline. I've narrowed it down to the following issue: anyone know why the following Jenkins pipeline doesn't make the build result SUCCESS? Instead the build fails.</p>
  
  <pre><code>print "Setting result to FAILURE"
  currentBuild.result = 'FAILURE'
  
  print "Setting result to SUCCESS"
  currentBuild.result = 'SUCCESS'
  </code></pre>