Package jenkins.plugins.slack
Class SlackNotifier
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Notifier
-
- jenkins.plugins.slack.SlackNotifier
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
public class SlackNotifier extends Notifier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SlackNotifier.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
-
-
Field Summary
Fields Modifier and Type Field Description static String
MATRIX_PROJECT_CLASS_NAME
static String
MATRIX_RUN_CLASS_NAME
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description SlackNotifier(String baseUrl, String teamDomain, String authToken, boolean botUser, String room, String tokenCredentialId, String sendAs, boolean startNotification, boolean notifyAborted, boolean notifyFailure, boolean notifyNotBuilt, boolean notifySuccess, boolean notifyUnstable, boolean notifyRegression, boolean notifyBackToNormal, boolean notifyRepeatedFailure, boolean includeTestSummary, boolean includeFailedTests, CommitInfoChoice commitInfoChoice, boolean includeCustomMessage, String customMessage)
Deprecated.SlackNotifier(String baseUrl, String teamDomain, String authToken, boolean botUser, String room, String tokenCredentialId, String sendAs, boolean startNotification, boolean notifyAborted, boolean notifyFailure, boolean notifyNotBuilt, boolean notifySuccess, boolean notifyUnstable, boolean notifyRegression, boolean notifyBackToNormal, boolean notifyRepeatedFailure, boolean includeTestSummary, boolean includeFailedTests, CommitInfoChoice commitInfoChoice, boolean includeCustomMessage, String customMessage, String customMessageSuccess, String customMessageAborted, String customMessageNotBuilt, String customMessageUnstable, String customMessageFailure)
Deprecated.SlackNotifier(String baseUrl, String teamDomain, String authToken, boolean botUser, String room, String tokenCredentialId, String sendAs, boolean startNotification, boolean notifyAborted, boolean notifyFailure, boolean notifyNotBuilt, boolean notifySuccess, boolean notifyUnstable, boolean notifyRegression, boolean notifyBackToNormal, boolean notifyRepeatedFailure, boolean includeTestSummary, boolean includeFailedTests, MatrixTriggerMode matrixTriggerMode, CommitInfoChoice commitInfoChoice, boolean includeCustomMessage, String customMessage, String customMessageSuccess, String customMessageAborted, String customMessageNotBuilt, String customMessageUnstable, String customMessageFailure)
Deprecated.SlackNotifier(CommitInfoChoice commitInfoChoice)
-
Method Summary
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform
-
-
-
-
Field Detail
-
MATRIX_PROJECT_CLASS_NAME
public static final String MATRIX_PROJECT_CLASS_NAME
- See Also:
- Constant Field Values
-
MATRIX_RUN_CLASS_NAME
public static final String MATRIX_RUN_CLASS_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SlackNotifier
@DataBoundConstructor public SlackNotifier(CommitInfoChoice commitInfoChoice)
-
SlackNotifier
@Deprecated public SlackNotifier(String baseUrl, String teamDomain, String authToken, boolean botUser, String room, String tokenCredentialId, String sendAs, boolean startNotification, boolean notifyAborted, boolean notifyFailure, boolean notifyNotBuilt, boolean notifySuccess, boolean notifyUnstable, boolean notifyRegression, boolean notifyBackToNormal, boolean notifyRepeatedFailure, boolean includeTestSummary, boolean includeFailedTests, CommitInfoChoice commitInfoChoice, boolean includeCustomMessage, String customMessage)
Deprecated.
-
SlackNotifier
@Deprecated public SlackNotifier(String baseUrl, String teamDomain, String authToken, boolean botUser, String room, String tokenCredentialId, String sendAs, boolean startNotification, boolean notifyAborted, boolean notifyFailure, boolean notifyNotBuilt, boolean notifySuccess, boolean notifyUnstable, boolean notifyRegression, boolean notifyBackToNormal, boolean notifyRepeatedFailure, boolean includeTestSummary, boolean includeFailedTests, CommitInfoChoice commitInfoChoice, boolean includeCustomMessage, String customMessage, String customMessageSuccess, String customMessageAborted, String customMessageNotBuilt, String customMessageUnstable, String customMessageFailure)
Deprecated.
-
SlackNotifier
@Deprecated public SlackNotifier(String baseUrl, String teamDomain, String authToken, boolean botUser, String room, String tokenCredentialId, String sendAs, boolean startNotification, boolean notifyAborted, boolean notifyFailure, boolean notifyNotBuilt, boolean notifySuccess, boolean notifyUnstable, boolean notifyRegression, boolean notifyBackToNormal, boolean notifyRepeatedFailure, boolean includeTestSummary, boolean includeFailedTests, MatrixTriggerMode matrixTriggerMode, CommitInfoChoice commitInfoChoice, boolean includeCustomMessage, String customMessage, String customMessageSuccess, String customMessageAborted, String customMessageNotBuilt, String customMessageUnstable, String customMessageFailure)
Deprecated.
-
-
Method Detail
-
getAuthTokenCredentialId
public String getAuthTokenCredentialId()
-
getDescriptor
public SlackNotifier.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Publisher>
- Overrides:
getDescriptor
in classNotifier
-
getBaseUrl
public String getBaseUrl()
-
getTeamDomain
public String getTeamDomain()
-
setTeamDomain
@DataBoundSetter public void setTeamDomain(String teamDomain)
-
getRoom
public String getRoom()
-
setRoom
@DataBoundSetter public void setRoom(String room)
-
getAuthToken
public String getAuthToken()
-
setAuthToken
@DataBoundSetter public void setAuthToken(String authToken)
-
getTokenCredentialId
public String getTokenCredentialId()
-
setTokenCredentialId
@DataBoundSetter public void setTokenCredentialId(String tokenCredentialId)
-
getBotUser
public boolean getBotUser()
-
setBotUser
@DataBoundSetter public void setBotUser(boolean botUser)
-
getSendAs
public String getSendAs()
-
setSendAs
@DataBoundSetter public void setSendAs(String sendAs)
-
getSendAsText
public boolean getSendAsText()
-
setSendAsText
@DataBoundSetter public void setSendAsText(boolean sendAsText)
-
getIconEmoji
public String getIconEmoji()
-
setIconEmoji
@DataBoundSetter public void setIconEmoji(String iconEmoji)
-
getUsername
public String getUsername()
-
setUsername
@DataBoundSetter public void setUsername(String username)
-
getStartNotification
public boolean getStartNotification()
-
getNotifySuccess
public boolean getNotifySuccess()
-
getCommitInfoChoice
public CommitInfoChoice getCommitInfoChoice()
-
getMatrixTriggerMode
@CheckForNull public MatrixTriggerMode getMatrixTriggerMode()
-
getNotifyAborted
public boolean getNotifyAborted()
-
getNotifyFailure
public boolean getNotifyFailure()
-
getNotifyEveryFailure
public boolean getNotifyEveryFailure()
-
getNotifyNotBuilt
public boolean getNotifyNotBuilt()
-
getNotifyUnstable
public boolean getNotifyUnstable()
-
getNotifyRegression
public boolean getNotifyRegression()
-
getNotifyBackToNormal
public boolean getNotifyBackToNormal()
-
getIncludeTestSummary
public boolean getIncludeTestSummary()
-
getIncludeFailedTests
public boolean getIncludeFailedTests()
-
getUploadFiles
public boolean getUploadFiles()
-
getArtifactIncludes
public String getArtifactIncludes()
-
getNotifyRepeatedFailure
public boolean getNotifyRepeatedFailure()
-
getIncludeCustomMessage
public boolean getIncludeCustomMessage()
-
getCustomMessage
public String getCustomMessage()
-
getCustomMessageSuccess
public String getCustomMessageSuccess()
-
getCustomMessageAborted
public String getCustomMessageAborted()
-
getCustomMessageNotBuilt
public String getCustomMessageNotBuilt()
-
getCustomMessageUnstable
public String getCustomMessageUnstable()
-
getCustomMessageFailure
public String getCustomMessageFailure()
-
getSlackUserIdResolver
public SlackUserIdResolver getSlackUserIdResolver()
-
setBaseUrl
@DataBoundSetter public void setBaseUrl(String baseUrl)
-
setStartNotification
@DataBoundSetter public void setStartNotification(boolean startNotification)
-
setNotifySuccess
@DataBoundSetter public void setNotifySuccess(boolean notifySuccess)
-
setCommitInfoChoice
@DataBoundSetter public void setCommitInfoChoice(CommitInfoChoice commitInfoChoice)
-
setMatrixTriggerMode
@DataBoundSetter public void setMatrixTriggerMode(MatrixTriggerMode matrixTriggerMode)
-
setNotifyAborted
@DataBoundSetter public void setNotifyAborted(boolean notifyAborted)
-
setNotifyFailure
@DataBoundSetter public void setNotifyFailure(boolean notifyFailure)
-
setNotifyEveryFailure
@DataBoundSetter public void setNotifyEveryFailure(boolean notifyEveryFailure)
-
setNotifyNotBuilt
@DataBoundSetter public void setNotifyNotBuilt(boolean notifyNotBuilt)
-
setNotifyUnstable
@DataBoundSetter public void setNotifyUnstable(boolean notifyUnstable)
-
setNotifyRegression
@DataBoundSetter public void setNotifyRegression(boolean notifyRegression)
-
setNotifyBackToNormal
@DataBoundSetter public void setNotifyBackToNormal(boolean notifyBackToNormal)
-
setIncludeTestSummary
@DataBoundSetter public void setIncludeTestSummary(boolean includeTestSummary)
-
setIncludeFailedTests
@DataBoundSetter public void setIncludeFailedTests(boolean includeFailedTests)
-
setUploadFiles
@DataBoundSetter public void setUploadFiles(boolean uploadFiles)
-
setArtifactIncludes
@DataBoundSetter public void setArtifactIncludes(String artifactIncludes)
-
setNotifyRepeatedFailure
@DataBoundSetter public void setNotifyRepeatedFailure(boolean notifyRepeatedFailure)
-
setIncludeCustomMessage
@DataBoundSetter public void setIncludeCustomMessage(boolean includeCustomMessage)
-
setCustomMessage
@DataBoundSetter public void setCustomMessage(String customMessage)
-
setCustomMessageSuccess
@DataBoundSetter public void setCustomMessageSuccess(String customMessageSuccess)
-
setCustomMessageAborted
@DataBoundSetter public void setCustomMessageAborted(String customMessageAborted)
-
setCustomMessageNotBuilt
@DataBoundSetter public void setCustomMessageNotBuilt(String customMessageNotBuilt)
-
setCustomMessageUnstable
@DataBoundSetter public void setCustomMessageUnstable(String customMessageUnstable)
-
setCustomMessageFailure
@DataBoundSetter public void setCustomMessageFailure(String customMessageFailure)
-
setSlackUserIdResolver
@DataBoundSetter public void setSlackUserIdResolver(SlackUserIdResolver slackUserIdResolver)
-
builder
public static SlackNotifierBuilder builder()
-
isAnyCustomMessagePopulated
public boolean isAnyCustomMessagePopulated()
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
-
newSlackService
public SlackService newSlackService(AbstractBuild abstractBuild, BuildListener listener)
-
needsToRunAfterFinalized
public boolean needsToRunAfterFinalized()
- Overrides:
needsToRunAfterFinalized
in classPublisher
-
perform
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
-
prebuild
public boolean prebuild(AbstractBuild<?,?> build, BuildListener listener)
- Specified by:
prebuild
in interfaceBuildStep
- Overrides:
prebuild
in classBuildStepCompatibilityLayer
-
isMatrixRun
public boolean isMatrixRun(AbstractBuild<?,?> build)
-
-