Class NthFailureTrigger
java.lang.Object
hudson.plugins.emailext.plugins.EmailTrigger
hudson.plugins.emailext.plugins.trigger.NthFailureTrigger
- All Implemented Interfaces:
ExtensionPoint
,Describable<EmailTrigger>
- Direct Known Subclasses:
FirstFailureTrigger
,SecondFailureTrigger
,XNthFailureTrigger
Triggers an email after the specified number of consecutive failures
(preceeded by a successful build).
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNthFailureTrigger
(int failureCount, boolean sendToList, boolean sendToDevs, boolean sendToRequester, boolean sendToCulprits, String recipientList, String replyTo, String subject, String body, String attachmentsPattern, int attachBuildLog, String contentType) Deprecated.NthFailureTrigger
(int failureCount, List<RecipientProvider> recipientProviders, String recipientList, String replyTo, String subject, String body, String attachmentsPattern, int attachBuildLog, String contentType) Deprecated.override getRequiredFailureCount instead of passing in failureCountNthFailureTrigger
(List<RecipientProvider> recipientProviders, String recipientList, String replyTo, String subject, String body, String attachmentsPattern, int attachBuildLog, String contentType) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
boolean
Should this trigger bypass the email throttling? Defaults to false.boolean
trigger
(AbstractBuild<?, ?> build, TaskListener listener) Implementors of this method need to return true if the conditions to trigger an email have been met.Methods inherited from class hudson.plugins.emailext.plugins.EmailTrigger
all, allWatchable, configure, createMailType, createMailType, getDescriptor, getEmail, getNumFailures, isPreBuild, setEmail
-
Field Details
-
failureCount
Deprecated.
-
-
Constructor Details
-
NthFailureTrigger
@Deprecated public NthFailureTrigger(int failureCount, List<RecipientProvider> recipientProviders, String recipientList, String replyTo, String subject, String body, String attachmentsPattern, int attachBuildLog, String contentType) Deprecated.override getRequiredFailureCount instead of passing in failureCount -
NthFailureTrigger
-
NthFailureTrigger
@Deprecated public NthFailureTrigger(int failureCount, boolean sendToList, boolean sendToDevs, boolean sendToRequester, boolean sendToCulprits, String recipientList, String replyTo, String subject, String body, String attachmentsPattern, int attachBuildLog, String contentType) Deprecated.
-
-
Method Details
-
getRequiredFailureCount
protected int getRequiredFailureCount() -
trigger
Description copied from class:EmailTrigger
Implementors of this method need to return true if the conditions to trigger an email have been met.- Specified by:
trigger
in classEmailTrigger
- Parameters:
build
- The Build object after the project has been builtlistener
- Used for logging to the build log- Returns:
- true if the conditions have been met to trigger a build of this type
-
shouldBypassThrottling
public boolean shouldBypassThrottling()Description copied from class:EmailTrigger
Should this trigger bypass the email throttling? Defaults to false. Critical triggers like build failures override this to true.- Overrides:
shouldBypassThrottling
in classEmailTrigger
- Returns:
- true if the trigger should bypass the email throttling.
-