title: Jenkins pipeline post always step doesn't execute on failing build
body: <p>I have a Jenkins declarative pipeline which runs just fine when the build status is successful.</p>
  
  <p>However when the UI tests fail and the build status is set to failed all the code in the post always step is ignored.</p>
  
  <p>I have checked if maybe the test report is not created in case of test failures but these are present on the specified location.</p>
  
  <p>I have no idea why Jenkins won't run the post always step in case of a failing build.</p>
  
  <p>I expect the post always step to be run in both a failed or success scenario, can anyone explain to me why it doesn't?</p>
  
  <pre><code>        post {
          always {
                  node('master') {
                      dir('/appl/jenkins/test/workspace/pipeline/test-reports') {
                          unstash 'test-report'
  
                          // This plugin script replaces the hard coded D:\ drive references with the path of the Jenkins job
                          // in order to make screenshot links function OK in the Jenkins copy of the HTML report.
  
                          //TODO add build number to report to identify test run.
                          echo 'Run completed before script block'
  
                          script {
                              contentReplace(
                                      configs: [
                                              fileContentReplaceConfig(
                                                      configs: [
                                                              fileContentReplaceItemConfig(
                                                                      search: 'original_path',
                                                                      replace: 'replaced_path',
                                                                      matchCount: 0)
                                                      ],
                                                      fileEncoding: 'UTF-8',
                                                      filePath: '/appl/jenkins/test/workspace/pipeline/test-reports/report.html')
                                      ])
                          }
  
                          echo 'Run completed after script block'
  
                          // Below we use the Publish HTML plugin to publish the report.html resulting from the Extend Reports plugin.
                          publishHTML target: [
                                  allowMissing         : false,
                                  alwaysLinkToLastBuild: false,
                                  keepAll              : true,
                                  reportDir            : '/appl/jenkins/test/workspace/pipeline/test-reports',
                                  reportFiles          : 'report.html, *.png',
                                  reportName           : 'Extent Report deluxe (screenshots!)'
                          ]
  
                          echo 'Run completed after publish block'
  
                          //deleteDir() /* clean up Master workspace */
                      }
                  }
          }
  </code></pre>