-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: workflow-cps-plugin
-
Environment:Jenkins 2.101 on Ubuntu-16.04.3, pipeline 2.5, pipeline API 2.24
Finally in a pipeline does not report critical errors, leading to mysterious failures.
E.g: this following pipeline excerpt does not construct the dependency-check-report.html file for archiving, and no error is logged. However, the build silently fails as a result.
 try {
   stage('Build and test') {
     sh 'sbt -no-colors rebuild doc swaggerJson manifest'
   }
 } finally {
   stage('Archive coverage report') {
     archiveArtifacts "target/scala-2.12/scoverage-report/**"
     publishHTML(target: [reportName: "Code coverage report", reportDir: "target/scala-2.12/scoverage-report", reportFiles: "index.html"])
   }
   stage('Archive vulnerability report') {
     archiveArtifacts "target/scala-2.12/dependency-check-report.html"
     publishHTML(target: [reportName: "Vulnerabilty report", reportDir: "target/scala-2.12", reportFiles: "dependency-check-report.html"])
   }
 }
Â