Package hudson.tasks
Class Mailer
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Notifier
hudson.tasks.Mailer
- All Implemented Interfaces:
ExtensionPoint,Describable<Publisher>,BuildStep,SimpleBuildStep
Publisher that sends the build result in e-mail.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic classPer user property that is e-mail address.Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImplNested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanDeprecated.This hack may be removed in future versionsstatic Mailer.DescriptorImplDeprecated.as of 1.286 Usedescriptor()to obtain the current instance.booleanIf true, only the first unstable build will be reported.protected static final LoggerWhitespace-separated list of e-mail addresses that represent recipients.booleanIf true, individuals will receive e-mails regarding who broke the build.Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Mailer.DescriptorImplThis class does explicit check pointing.booleanbooleanperform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) voidperform(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) static jakarta.mail.internet.InternetAddressstringToAddress(String strAddress, String charset) Converts a string toInternetAddress.static jakarta.mail.internet.InternetAddressStringToAddress(String strAddress, String charset) Deprecated.Methods inherited from class hudson.tasks.Notifier
getDescriptorMethods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, prebuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, prebuildMethods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Field Details
-
LOGGER
-
recipients
Whitespace-separated list of e-mail addresses that represent recipients. -
dontNotifyEveryUnstableBuild
public boolean dontNotifyEveryUnstableBuildIf true, only the first unstable build will be reported. -
sendToIndividuals
public boolean sendToIndividualsIf true, individuals will receive e-mails regarding who broke the build. -
DESCRIPTOR
@Deprecated @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince("1.355") public static Mailer.DescriptorImpl DESCRIPTORDeprecated.as of 1.286 Usedescriptor()to obtain the current instance. -
debug
Deprecated.This hack may be removed in future versionsDebug probe point to be activated by the scripting console.
-
-
Constructor Details
-
Mailer
Deprecated.Default Constructor. This is left for backward compatibility. -
Mailer
@DataBoundConstructor public Mailer(String recipients, boolean notifyEveryUnstableBuild, boolean sendToIndividuals) - Parameters:
recipients- one or more recipients with separatorsnotifyEveryUnstableBuild- inverted for historical reasons.sendToIndividuals- iftruemails are sent to individual committers
-
-
Method Details
-
isNotifyEveryUnstableBuild
public boolean isNotifyEveryUnstableBuild() -
perform
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException- Specified by:
performin interfaceBuildStep- Overrides:
performin classBuildStepCompatibilityLayer- Throws:
InterruptedExceptionIOException
-
perform
public void perform(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException- Specified by:
performin interfaceSimpleBuildStep- Throws:
IOExceptionInterruptedException
-
getRequiredMonitorService
This class does explicit check pointing.- Specified by:
getRequiredMonitorServicein interfaceBuildStep
-
StringToAddress
@Deprecated @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @RestrictedSince("1.16") public static jakarta.mail.internet.InternetAddress StringToAddress(String strAddress, String charset) throws jakarta.mail.internet.AddressException, UnsupportedEncodingException Deprecated.Deprecated! Converts a string toInternetAddress.- Parameters:
strAddress- Address stringcharset- Charset (encoding) to be used- Returns:
InternetAddressfor the specified string- Throws:
jakarta.mail.internet.AddressException- Malformed addressUnsupportedEncodingException- Unsupported encoding
-
stringToAddress
@NonNull public static jakarta.mail.internet.InternetAddress stringToAddress(@NonNull String strAddress, @NonNull String charset) throws jakarta.mail.internet.AddressException, UnsupportedEncodingException Converts a string toInternetAddress.- Parameters:
strAddress- Address stringcharset- Charset (encoding) to be used- Returns:
InternetAddressfor the specified string- Throws:
jakarta.mail.internet.AddressException- Malformed addressUnsupportedEncodingException- Unsupported encoding- Since:
- TODO
-
descriptor
-