Package com.mathworks.polyspace.jenkins
Class PolyspacePostBuildActions
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Notifier
-
- com.mathworks.polyspace.jenkins.PolyspacePostBuildActions
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
,SimpleBuildStep
public class PolyspacePostBuildActions extends Notifier implements SimpleBuildStep
Publisher
that sends Polyspace Notification in e-mail.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PolyspacePostBuildActions.DescriptorImpl
-
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
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description PolyspacePostBuildActions()
Unique recipient that receives all emails
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildStepMonitor
getRequiredMonitorService()
This class does explicit check pointing.void
perform(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener)
void
sendMail(String sendMailTo, String subject, String text, String attachSource, String attachName)
void
setFileToAttach(String fileToAttach)
void
setMailBody(String mailBody)
void
setMailBodyBaseName(String mailBodyBaseName)
void
setMailSubject(String mailSubject)
void
setMailSubjectBaseName(String mailSubjectBaseName)
void
setQueryBaseName(String queryBaseName)
void
setRecipients(String recipients)
void
setSendToOwners(Boolean sendToOwners)
void
setSendToRecipients(Boolean sendToRecipients)
void
setUniqueRecipients(String uniqueRecipients)
static jakarta.mail.internet.InternetAddress
stringToAddress(String strAddress, String charset)
Converts a String toInternetAddress
.-
Methods inherited from class hudson.tasks.Notifier
getDescriptor
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Method Detail
-
setSendToRecipients
@DataBoundSetter public void setSendToRecipients(Boolean sendToRecipients)
-
setRecipients
@DataBoundSetter public void setRecipients(String recipients)
-
setFileToAttach
@DataBoundSetter public void setFileToAttach(String fileToAttach)
-
setMailSubject
@DataBoundSetter public void setMailSubject(String mailSubject)
-
setMailBody
@DataBoundSetter public void setMailBody(String mailBody)
-
setSendToOwners
@DataBoundSetter public void setSendToOwners(Boolean sendToOwners)
-
setQueryBaseName
@DataBoundSetter public void setQueryBaseName(String queryBaseName)
-
setMailSubjectBaseName
@DataBoundSetter public void setMailSubjectBaseName(String mailSubjectBaseName)
-
setMailBodyBaseName
@DataBoundSetter public void setMailBodyBaseName(String mailBodyBaseName)
-
setUniqueRecipients
@DataBoundSetter public void setUniqueRecipients(String uniqueRecipients)
-
sendMail
public void sendMail(@QueryParameter String sendMailTo, @QueryParameter String subject, @QueryParameter String text, @QueryParameter String attachSource, @QueryParameter String attachName) throws IOException
- Throws:
IOException
-
perform
public void perform(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException
- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
IOException
InterruptedException
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
This class does explicit check pointing.- Specified by:
getRequiredMonitorService
in interfaceBuildStep
-
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:
InternetAddress
for the specified String- Throws:
jakarta.mail.internet.AddressException
- Malformed addressUnsupportedEncodingException
- Unsupported encoding
-
-