SLING-8572 - sling-ide-tooling is reported as broken but is actually successful
Move debug information higher up so it's printed even for projects
with no recipients defined.
diff --git a/src/org/apache/sling/jenkins/SlingJenkinsHelper.groovy b/src/org/apache/sling/jenkins/SlingJenkinsHelper.groovy
index 01e1123..c733639 100644
--- a/src/org/apache/sling/jenkins/SlingJenkinsHelper.groovy
+++ b/src/org/apache/sling/jenkins/SlingJenkinsHelper.groovy
@@ -127,13 +127,6 @@
return
}
- def recipients = jobConfig['emailRecipients']
-
- if ( !recipients ) {
- echo "No recipients defined, not sending notifications."
- return
- }
-
// values described at https://javadoc.jenkins-ci.org/hudson/model/Result.html
// Note that we don't handle consecutive failures to prevent mail spamming
@@ -144,6 +137,13 @@
echo "[DEBUG] current result (variant 1) is ${current}, current result (variant 2) is ${currentBuild.currentResult}, previous result is ${previous}"
+ def recipients = jobConfig['emailRecipients']
+
+ if ( !recipients ) {
+ echo "No recipients defined, not sending notifications."
+ return
+ }
+
// 1. changes from success or unknown to non-success
if ( (previous == null || previous == "SUCCESS") && current != "SUCCESS" ) {
change = "BROKEN"