Package nz.co.jammehcow.jenkinsdiscord
Class WebhookPublisher
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Notifier
-
- nz.co.jammehcow.jenkinsdiscord.WebhookPublisher
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
public class WebhookPublisher extends Notifier
Author: jammehcow. Date: 22/04/17.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WebhookPublisher.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 inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description WebhookPublisher(String webhookURL, String thumbnailURL, boolean sendOnStateChange, String statusTitle, String notes, String branchName, String customAvatarUrl, String customUsername, boolean sendOnStateFailed, boolean sendOnlyFailed, boolean enableUrlLinking, boolean enableArtifactList, boolean enableFooterInfo, boolean showChangeset, boolean sendLogFile, boolean sendStartNotification, String scmWebUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBranchName()
String
getCustomAvatarUrl()
String
getCustomUsername()
WebhookPublisher.DescriptorImpl
getDescriptor()
String
getDynamicFieldContainer()
String
getNotes()
BuildStepMonitor
getRequiredMonitorService()
String
getScmWebUrl()
String
getStatusTitle()
String
getThumbnailURL()
String
getWebhookURL()
boolean
isEnableArtifactList()
boolean
isEnableFooterInfo()
boolean
isEnableUrlLinking()
boolean
isSendLogFile()
boolean
isSendOnlyFailed()
boolean
isSendOnStateChange()
boolean
isSendStartNotification()
boolean
isShowChangeset()
boolean
needsToRunAfterFinalized()
boolean
perform(AbstractBuild build, Launcher launcher, BuildListener listener)
boolean
prebuild(AbstractBuild<?,?> build, BuildListener listener)
void
setDynamicFieldContainer(String fieldsString)
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform
-
-
-
-
Constructor Detail
-
WebhookPublisher
@DataBoundConstructor public WebhookPublisher(String webhookURL, String thumbnailURL, boolean sendOnStateChange, String statusTitle, String notes, String branchName, String customAvatarUrl, String customUsername, boolean sendOnStateFailed, boolean sendOnlyFailed, boolean enableUrlLinking, boolean enableArtifactList, boolean enableFooterInfo, boolean showChangeset, boolean sendLogFile, boolean sendStartNotification, String scmWebUrl)
-
-
Method Detail
-
getWebhookURL
public String getWebhookURL()
-
getBranchName
public String getBranchName()
-
getStatusTitle
public String getStatusTitle()
-
getCustomAvatarUrl
public String getCustomAvatarUrl()
-
getCustomUsername
public String getCustomUsername()
-
setDynamicFieldContainer
@DataBoundSetter public void setDynamicFieldContainer(String fieldsString)
-
getDynamicFieldContainer
public String getDynamicFieldContainer()
-
getNotes
public String getNotes()
-
getThumbnailURL
public String getThumbnailURL()
-
isSendOnStateChange
public boolean isSendOnStateChange()
-
isSendOnlyFailed
public boolean isSendOnlyFailed()
-
isEnableUrlLinking
public boolean isEnableUrlLinking()
-
isEnableArtifactList
public boolean isEnableArtifactList()
-
isEnableFooterInfo
public boolean isEnableFooterInfo()
-
isShowChangeset
public boolean isShowChangeset()
-
isSendLogFile
public boolean isSendLogFile()
-
isSendStartNotification
public boolean isSendStartNotification()
-
getScmWebUrl
public String getScmWebUrl()
-
needsToRunAfterFinalized
public boolean needsToRunAfterFinalized()
- Overrides:
needsToRunAfterFinalized
in classPublisher
-
prebuild
public boolean prebuild(AbstractBuild<?,?> build, BuildListener listener)
- Specified by:
prebuild
in interfaceBuildStep
- Overrides:
prebuild
in classBuildStepCompatibilityLayer
-
perform
public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
- Throws:
IOException
InterruptedException
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
-
getDescriptor
public WebhookPublisher.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Publisher>
- Overrides:
getDescriptor
in classNotifier
-
-