Package hudson.plugins.emailext
Class ExtendedEmailPublisher
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Notifier
hudson.plugins.emailext.ExtendedEmailPublisher
- All Implemented Interfaces:
ExtensionPoint,Describable<Publisher>,BuildStep
Publisher that sends notification e-mail.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classNested 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.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanTrue to attach the log from the build to the email.The project wide set of attachments.booleanTrue to compress the log from the build before attaching to the emailThis is the list of email theTriggers that the project has configuredThe contentType of the emails for this project (text/html, text/plain, etc).static final Stringstatic final Stringstatic final StringThe default body of the emails for this project.The default subject of the emails for this project.booleanIf true, disables the publisher from running.From value for the e-mailHow to theTrigger the email if the project is a matrix project.static final Stringstatic final StringA comma-separated list of email recipient that will be used for every theTrigger.Reply-To value for the e-mailbooleanIf true, save the generated email content to email-ext-message.[txt|html]booleanFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
ConstructorsConstructorDescriptionExtendedEmailPublisher(String project_recipient_list, String project_content_type, String project_default_subject, String project_default_content, String project_attachments, String project_presend_script, int project_attach_buildlog, String project_replyto, String project_from, boolean project_save_output, List<EmailTrigger> project_triggers, MatrixTriggerMode matrixTriggerMode) Deprecated.ExtendedEmailPublisher(String recipientList, String contentType, String defaultSubject, String defaultContent, String attachmentsPattern, String presendScript, int attachBuildLog, String replyTo, String from, boolean saveOutput, List<EmailTrigger> configuredTriggers, MatrixTriggerMode matrixTriggerMode, boolean disabled, List<GroovyScriptPath> classpath) -
Method Summary
Modifier and TypeMethodDescriptionvoiddebug(PrintStream p, String format, Object... args) intGet the list of configured email theTriggers for this project.static Run<?,?> getPreviousRun(Run<?, ?> run, TaskListener listener) Looks for a previous build, so long as that is in fact completed.Collection<? extends Action>getProjectActions(AbstractProject<?, ?> project) List<org.jenkinsci.plugins.tokenmacro.TokenMacro>booleanbooleanbooleanperform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) booleanprebuild(AbstractBuild<?, ?> build, BuildListener listener) voidsetClasspath(List<GroovyScriptPath> classpath) voidsetMatrixTriggerMode(MatrixTriggerMode matrixTriggerMode) voidsetPostsendScript(String postsendScript) voidsetPresendScript(String presendScript) Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, perform
-
Field Details
-
DEFAULT_SUBJECT_TEXT
- See Also:
-
DEFAULT_BODY_TEXT
- See Also:
-
DEFAULT_EMERGENCY_REROUTE_TEXT
- See Also:
-
PROJECT_DEFAULT_SUBJECT_TEXT
- See Also:
-
PROJECT_DEFAULT_BODY_TEXT
- See Also:
-
recipientList
A comma-separated list of email recipient that will be used for every theTrigger. -
configuredTriggers
This is the list of email theTriggers that the project has configured -
contentType
The contentType of the emails for this project (text/html, text/plain, etc). -
defaultSubject
The default subject of the emails for this project. ($PROJECT_DEFAULT_SUBJECT) -
defaultContent
The default body of the emails for this project. ($PROJECT_DEFAULT_BODY) -
attachmentsPattern
The project wide set of attachments. -
attachBuildLog
public boolean attachBuildLogTrue to attach the log from the build to the email. -
compressBuildLog
public boolean compressBuildLogTrue to compress the log from the build before attaching to the email -
replyTo
Reply-To value for the e-mail -
from
From value for the e-mail -
saveOutput
public boolean saveOutputIf true, save the generated email content to email-ext-message.[txt|html] -
disabled
public boolean disabledIf true, disables the publisher from running. -
throttlingEnabled
public boolean throttlingEnabled -
matrixTriggerMode
How to theTrigger the email if the project is a matrix project.
-
-
Constructor Details
-
ExtendedEmailPublisher
public ExtendedEmailPublisher() -
ExtendedEmailPublisher
@Deprecated public ExtendedEmailPublisher(String project_recipient_list, String project_content_type, String project_default_subject, String project_default_content, String project_attachments, String project_presend_script, int project_attach_buildlog, String project_replyto, String project_from, boolean project_save_output, List<EmailTrigger> project_triggers, MatrixTriggerMode matrixTriggerMode) Deprecated. -
ExtendedEmailPublisher
@DataBoundConstructor public ExtendedEmailPublisher(String recipientList, String contentType, String defaultSubject, String defaultContent, String attachmentsPattern, String presendScript, int attachBuildLog, String replyTo, String from, boolean saveOutput, List<EmailTrigger> configuredTriggers, MatrixTriggerMode matrixTriggerMode, boolean disabled, List<GroovyScriptPath> classpath)
-
-
Method Details
-
getClasspath
-
setClasspath
-
setPresendScript
-
getAttachBuildLog
public int getAttachBuildLog() -
setPostsendScript
-
getPresendScript
-
getPostsendScript
-
getConfiguredTriggers
Get the list of configured email theTriggers for this project.- Returns:
- The list of triggers configure for this publisher instance
-
getMatrixTriggerMode
-
setMatrixTriggerMode
-
getProjectActions
- Specified by:
getProjectActionsin interfaceBuildStep- Overrides:
getProjectActionsin classBuildStepCompatibilityLayer
-
debug
-
prebuild
- Specified by:
prebuildin interfaceBuildStep- Overrides:
prebuildin classBuildStepCompatibilityLayer
-
perform
- Specified by:
performin interfaceBuildStep- Overrides:
performin classBuildStepCompatibilityLayer
-
getRuntimeMacros
public List<org.jenkinsci.plugins.tokenmacro.TokenMacro> getRuntimeMacros(ExtendedEmailPublisherContext context) -
isExecuteOnMatrixNodes
public boolean isExecuteOnMatrixNodes() -
needsToRunAfterFinalized
public boolean needsToRunAfterFinalized()- Overrides:
needsToRunAfterFinalizedin classPublisher
-
getRequiredMonitorService
-
getPreviousRun
Looks for a previous build, so long as that is in fact completed. Necessary sincegetRequiredMonitorService()does not wait for the previous build, so in the case of parallel-capable jobs, we need to behave sensibly when a later build actually finishes before an earlier one.- Parameters:
run- a run for which we may be sending maillistener- a listener to which we may print warnings in case the actual previous build is still in progress- Returns:
- the previous build, or null if that build is missing, or is still in progress
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<Publisher>- Overrides:
getDescriptorin classNotifier
-
descriptor
-
readResolve
-