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
,hudson.matrix.MatrixAggregatable
,Describable<Publisher>
,BuildStep
Publisher
that sends notification e-mail.-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionboolean
True to attach the log from the build to the email.The project wide set of attachments.boolean
True 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 String
static final String
static final String
The default body of the emails for this project.The default subject of the emails for this project.boolean
If 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 String
static final String
A comma-separated list of email recipient that will be used for every theTrigger.Reply-To value for the e-mailboolean
If true, save the generated email content to email-ext-message.[txt|html]boolean
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
Constructor Summary
ConstructorDescriptionExtendedEmailPublisher
(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 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, boolean project_disabled, List<GroovyScriptPath> classpath) -
Method Summary
Modifier and TypeMethodDescriptionhudson.matrix.MatrixAggregator
createAggregator
(hudson.matrix.MatrixBuild matrixbuild, Launcher launcher, BuildListener buildlistener) void
debug
(PrintStream p, String format, Object... args) Get 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>
boolean
boolean
boolean
perform
(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) boolean
prebuild
(AbstractBuild<?, ?> build, BuildListener listener) void
setClasspath
(List<GroovyScriptPath> classpath) void
setMatrixTriggerMode
(MatrixTriggerMode matrixTriggerMode) void
setPostsendScript
(String postsendScript) void
setPresendScript
(String presendScript) Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuild
Methods 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 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, boolean project_disabled, List<GroovyScriptPath> classpath)
-
-
Method Details
-
getClasspath
-
setClasspath
-
setPresendScript
-
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:
getProjectActions
in interfaceBuildStep
- Overrides:
getProjectActions
in classBuildStepCompatibilityLayer
-
debug
-
prebuild
- Specified by:
prebuild
in interfaceBuildStep
- Overrides:
prebuild
in classBuildStepCompatibilityLayer
-
perform
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
-
getRuntimeMacros
public List<org.jenkinsci.plugins.tokenmacro.TokenMacro> getRuntimeMacros(ExtendedEmailPublisherContext context) -
isExecuteOnMatrixNodes
public boolean isExecuteOnMatrixNodes() -
needsToRunAfterFinalized
public boolean needsToRunAfterFinalized()- Overrides:
needsToRunAfterFinalized
in classPublisher
-
getRequiredMonitorService
- Specified by:
getRequiredMonitorService
in interfaceBuildStep
-
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:
getDescriptor
in interfaceDescribable<Publisher>
- Overrides:
getDescriptor
in classNotifier
-
descriptor
-
createAggregator
public hudson.matrix.MatrixAggregator createAggregator(hudson.matrix.MatrixBuild matrixbuild, Launcher launcher, BuildListener buildlistener) - Specified by:
createAggregator
in interfacehudson.matrix.MatrixAggregatable
-
readResolve
-