Skip to content

Commit

Permalink
Support NEW_FAILURE_AND_FIXED instant messaging strategy
Browse files Browse the repository at this point in the history
instant-messaging-plugin supports NEW_FAILURE_AND_FIXED since 2013,
so enabling usage of it in DSL for Jabber and IRC plugins.
  • Loading branch information
kad committed Mar 7, 2016
1 parent db73f9e commit 686cc3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import static javaposse.jobdsl.dsl.Preconditions.checkNotNullOrEmpty
class IrcContext implements Context {
List<IrcPublisherChannel> channels = []

List<String> strategies = ['ALL', 'ANY_FAILURE', 'FAILURE_AND_FIXED', 'STATECHANGE_ONLY']
List<String> strategies = ['ALL', 'ANY_FAILURE', 'FAILURE_AND_FIXED', 'NEW_FAILURE_AND_FIXED', 'STATECHANGE_ONLY']

List<String> notificationMessages = ['Default', 'SummaryOnly', 'BuildParameters', 'PrintFailingTests']

Expand Down Expand Up @@ -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(',')}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import static javaposse.jobdsl.dsl.Preconditions.checkArgument

class JabberContext implements Context {
private static final Set<String> 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<String> VALID_CHANNEL_NOTIFICATION_NAMES = [
'Default', 'SummaryOnly', 'BuildParameters', 'PrintFailingTests'
Expand All @@ -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(
Expand Down

0 comments on commit 686cc3a

Please sign in to comment.