From 686cc3a761f179e744848dc3a34bfa8d9ef737e4 Mon Sep 17 00:00:00 2001 From: "Alexander D. Kanevskiy" Date: Mon, 7 Mar 2016 16:38:40 +0200 Subject: [PATCH] Support NEW_FAILURE_AND_FIXED instant messaging strategy instant-messaging-plugin supports NEW_FAILURE_AND_FIXED since 2013, so enabling usage of it in DSL for Jabber and IRC plugins. --- .../javaposse/jobdsl/dsl/helpers/publisher/IrcContext.groovy | 4 ++-- .../jobdsl/dsl/helpers/publisher/JabberContext.groovy | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/IrcContext.groovy b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/IrcContext.groovy index 6e252e75c..3f61e3b95 100644 --- a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/IrcContext.groovy +++ b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/IrcContext.groovy @@ -9,7 +9,7 @@ import static javaposse.jobdsl.dsl.Preconditions.checkNotNullOrEmpty class IrcContext implements Context { List channels = [] - List strategies = ['ALL', 'ANY_FAILURE', 'FAILURE_AND_FIXED', 'STATECHANGE_ONLY'] + List strategies = ['ALL', 'ANY_FAILURE', 'FAILURE_AND_FIXED', 'NEW_FAILURE_AND_FIXED', 'STATECHANGE_ONLY'] List notificationMessages = ['Default', 'SummaryOnly', 'BuildParameters', 'PrintFailingTests'] @@ -65,7 +65,7 @@ class IrcContext implements Context { /** * Specifies when to send notifications. Must be one of {@code 'ALL'}, {@code 'FAILURE_AND_FIXED'}, - * {@code 'ANY_FAILURE'} or {@code 'STATECHANGE_ONLY'}. + * {@code 'ANY_FAILURE'}, {@code 'NEW_FAILURE_AND_FIXED'} or {@code 'STATECHANGE_ONLY'}. */ void strategy(String strategy) { checkArgument(strategies.contains(strategy), "Possible values: ${strategies.join(',')}") diff --git a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/JabberContext.groovy b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/JabberContext.groovy index 93b4ffd47..e8b99bc9d 100644 --- a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/JabberContext.groovy +++ b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/JabberContext.groovy @@ -6,7 +6,7 @@ import static javaposse.jobdsl.dsl.Preconditions.checkArgument class JabberContext implements Context { private static final Set VALID_STRATEGY_NAMES = [ - 'ALL', 'FAILURE_AND_FIXED', 'ANY_FAILURE', 'STATECHANGE_ONLY' + 'ALL', 'FAILURE_AND_FIXED', 'ANY_FAILURE', 'STATECHANGE_ONLY', 'NEW_FAILURE_AND_FIXED' ] private static final Set VALID_CHANNEL_NOTIFICATION_NAMES = [ 'Default', 'SummaryOnly', 'BuildParameters', 'PrintFailingTests' @@ -22,7 +22,7 @@ class JabberContext implements Context { /** * Specifies when to send notifications. Must be one of {@code 'ALL'} (default), {@code 'FAILURE_AND_FIXED'}, - * {@code 'ANY_FAILURE'} or {@code 'STATECHANGE_ONLY'}. + * {@code 'ANY_FAILURE'}, {@code 'NEW_FAILURE_AND_FIXED'} or {@code 'STATECHANGE_ONLY'}. */ void strategyName(String strategyName) { checkArgument(