Improved setting error messages to jenkins job descriptions
Change-Id: Ia19224b7334d6fd468ecc40be87d5b4df795adc5
diff --git a/aptly-promote-pipeline.groovy b/aptly-promote-pipeline.groovy
index e5d9743..eb10f40 100644
--- a/aptly-promote-pipeline.groovy
+++ b/aptly-promote-pipeline.groovy
@@ -26,9 +26,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
+}
diff --git a/build-debian-packages-jmx-exporter.groovy b/build-debian-packages-jmx-exporter.groovy
index b4e9760..71f626e 100644
--- a/build-debian-packages-jmx-exporter.groovy
+++ b/build-debian-packages-jmx-exporter.groovy
@@ -69,7 +69,7 @@
} catch (Throwable e) {
// If there was an 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"])
diff --git a/build-debian-packages-libvirt-exporter.groovy b/build-debian-packages-libvirt-exporter.groovy
index aa0c26a..ab83db6 100644
--- a/build-debian-packages-libvirt-exporter.groovy
+++ b/build-debian-packages-libvirt-exporter.groovy
@@ -72,7 +72,7 @@
} catch (Throwable e) {
// If there was an 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"])
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
+}
diff --git a/build-debian-packages-telegraf.groovy b/build-debian-packages-telegraf.groovy
index b7b64d9..dde098e 100644
--- a/build-debian-packages-telegraf.groovy
+++ b/build-debian-packages-telegraf.groovy
@@ -98,7 +98,7 @@
} catch (Throwable e) {
// If there was an 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"])
diff --git a/build-extra-dpdk-pipeline.groovy b/build-extra-dpdk-pipeline.groovy
index 3a97689..357a9ad 100644
--- a/build-extra-dpdk-pipeline.groovy
+++ b/build-extra-dpdk-pipeline.groovy
@@ -59,9 +59,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
+}
diff --git a/cicd-lab-pipeline.groovy b/cicd-lab-pipeline.groovy
index 9957c6c..8902e1f 100644
--- a/cicd-lab-pipeline.groovy
+++ b/cicd-lab-pipeline.groovy
@@ -337,7 +337,7 @@
} 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 {
// Cleanup
diff --git a/docker-build-image-pipeline.groovy b/docker-build-image-pipeline.groovy
index d91baac..c23f1c3 100644
--- a/docker-build-image-pipeline.groovy
+++ b/docker-build-image-pipeline.groovy
@@ -48,7 +48,7 @@
} 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"])
diff --git a/gating-pipeline.groovy b/gating-pipeline.groovy
index c8b4c09..1b62b53 100644
--- a/gating-pipeline.groovy
+++ b/gating-pipeline.groovy
@@ -68,7 +68,7 @@
} 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
}
}
diff --git a/generate-cookiecutter-products.groovy b/generate-cookiecutter-products.groovy
index 9f96d61..1d8845d 100644
--- a/generate-cookiecutter-products.groovy
+++ b/generate-cookiecutter-products.groovy
@@ -184,7 +184,7 @@
} 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 {
stage ('Clean workspace directories') {
diff --git a/git-merge-branches-pipeline.groovy b/git-merge-branches-pipeline.groovy
index 0d8c47b..8293f87 100644
--- a/git-merge-branches-pipeline.groovy
+++ b/git-merge-branches-pipeline.groovy
@@ -22,7 +22,7 @@
} 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
}
}
diff --git a/git-mirror-2way-pipeline.groovy b/git-mirror-2way-pipeline.groovy
index 4e2af09..c20af8f 100644
--- a/git-mirror-2way-pipeline.groovy
+++ b/git-mirror-2way-pipeline.groovy
@@ -38,7 +38,7 @@
} 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"])
diff --git a/git-mirror-pipeline.groovy b/git-mirror-pipeline.groovy
index 9378c9d..5035fe6 100644
--- a/git-mirror-pipeline.groovy
+++ b/git-mirror-pipeline.groovy
@@ -17,7 +17,7 @@
} 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"])
diff --git a/opencontrail-upgrade.groovy b/opencontrail-upgrade.groovy
index 0e5c98c..00b0e7f 100644
--- a/opencontrail-upgrade.groovy
+++ b/opencontrail-upgrade.groovy
@@ -273,7 +273,7 @@
} 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
}
}
@@ -485,7 +485,7 @@
} 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
}
}
diff --git a/openstack-compute-install.groovy b/openstack-compute-install.groovy
index d09dc44..535cde0 100644
--- a/openstack-compute-install.groovy
+++ b/openstack-compute-install.groovy
@@ -86,7 +86,7 @@
} 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
}
}
diff --git a/openstack-compute-upgrade.groovy b/openstack-compute-upgrade.groovy
index 658d5be..095697d 100644
--- a/openstack-compute-upgrade.groovy
+++ b/openstack-compute-upgrade.groovy
@@ -199,7 +199,7 @@
} 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
}
}
diff --git a/ovs-gateway-upgrade.groovy b/ovs-gateway-upgrade.groovy
index 5301a0a..9cfa215 100644
--- a/ovs-gateway-upgrade.groovy
+++ b/ovs-gateway-upgrade.groovy
@@ -148,7 +148,7 @@
} 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
}
}
diff --git a/release-salt-formulas-pipeline.groovy b/release-salt-formulas-pipeline.groovy
index df98f2b..4aaaec9 100644
--- a/release-salt-formulas-pipeline.groovy
+++ b/release-salt-formulas-pipeline.groovy
@@ -24,7 +24,7 @@
} 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"])
diff --git a/test-cookiecutter-reclass.groovy b/test-cookiecutter-reclass.groovy
index 482b349..4da0842 100644
--- a/test-cookiecutter-reclass.groovy
+++ b/test-cookiecutter-reclass.groovy
@@ -165,7 +165,7 @@
} catch (Throwable e) {
currentBuild.result = "FAILURE"
- currentBuild.description = e.message
+ currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message
throw e
} finally {
def dummy = "dummy"
diff --git a/test-salt-formulas-pipeline.groovy b/test-salt-formulas-pipeline.groovy
index b234af3..1fb62ad 100644
--- a/test-salt-formulas-pipeline.groovy
+++ b/test-salt-formulas-pipeline.groovy
@@ -117,7 +117,7 @@
} 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
ruby.runKitchenCommand("destroy")
throw e
} finally {
diff --git a/test-salt-model-node.groovy b/test-salt-model-node.groovy
index 890630f..bcc0c8b 100644
--- a/test-salt-model-node.groovy
+++ b/test-salt-model-node.groovy
@@ -60,7 +60,7 @@
} 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
}
}
diff --git a/test-salt-models-pipeline.groovy b/test-salt-models-pipeline.groovy
index 59068d7..32ef43c 100644
--- a/test-salt-models-pipeline.groovy
+++ b/test-salt-models-pipeline.groovy
@@ -115,7 +115,7 @@
}
} catch (Throwable e) {
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"])
diff --git a/test-system-reclass-pipeline.groovy b/test-system-reclass-pipeline.groovy
index d28acba..411edfc 100644
--- a/test-system-reclass-pipeline.groovy
+++ b/test-system-reclass-pipeline.groovy
@@ -76,7 +76,7 @@
} 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"])
diff --git a/update-package.groovy b/update-package.groovy
index 1d0187f..c946123 100644
--- a/update-package.groovy
+++ b/update-package.groovy
@@ -106,7 +106,7 @@
} 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
}
}
diff --git a/validate-cloud.groovy b/validate-cloud.groovy
index ec3498a..f2720c1 100644
--- a/validate-cloud.groovy
+++ b/validate-cloud.groovy
@@ -91,7 +91,7 @@
} 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 {
validate.runCleanup(saltMaster, TARGET_NODE, artifacts_dir)