Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support NEW_FAILURE_AND_FIXED instant messaging strategy #770

Merged
merged 1 commit into from
Mar 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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