SLING-7245 - Validate pull requests using Jenkins
Pass jobConfig to sendNotifications - apparently I can't define for
implicit classes.
diff --git a/src/org/apache/sling/jenkins/SlingJenkinsHelper.groovy b/src/org/apache/sling/jenkins/SlingJenkinsHelper.groovy
index 14e6d62..aed06bd 100644
--- a/src/org/apache/sling/jenkins/SlingJenkinsHelper.groovy
+++ b/src/org/apache/sling/jenkins/SlingJenkinsHelper.groovy
@@ -38,10 +38,10 @@
return result.join(',')
}
-def jobConfig = [:]
+
def runWithErrorHandling(Closure build) {
-
+ def jobConfig = [:]
try {
timeout(time:15, unit: 'MINUTES', activity: true) {
@@ -99,12 +99,12 @@
throw e
} finally {
stage("Notifications") {
- sendNotifications()
+ sendNotifications(jobConfig)
}
}
}
-def sendNotifications() {
+def sendNotifications(def jobConfig) {
if ( env.BRANCH_NAME != 'master' ) {
echo "Not sending notifications on branch name ${env.BRANCH_NAME} != 'master'"