Improved setting error messages to jenkins job descriptions
Change-Id: Ia19224b7334d6fd468ecc40be87d5b4df795adc5
diff --git a/build-debian-packages-pipeline.groovy b/build-debian-packages-pipeline.groovy
index 3b0bbb4..9e40944 100644
--- a/build-debian-packages-pipeline.groovy
+++ b/build-debian-packages-pipeline.groovy
@@ -116,9 +116,9 @@
} catch (Throwable e) {
// If there was an error or exception thrown, the build failed
currentBuild.result = "FAILURE"
- currentBuild.description = e.message
+ currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message
throw e
} finally {
common.sendNotification(currentBuild.result,"",["slack"])
}
-}
\ No newline at end of file
+}