Throw exception for build stage

This is required so Jenkins will properly mark the build failed on valid script errors.

Signed-off-by: brianherrera <briher@amazon.com>
This commit is contained in:
brianherrera
2021-09-21 16:05:25 -07:00
parent d44cc844d1
commit eaddd4eee7
+2
View File
@@ -525,6 +525,8 @@ def CreateSingleNode(Map pipelineConfig, def platform, def build_job, Map envVar
catch (Exception e) {
if (envVars['NONBLOCKING_STEP']?.toBoolean()) {
unstable(message: "Build step ${build_step} failed but it's a non-blocking step in build job ${build_job.key}")
} else {
throw e
}
}
}