Package com.webhookrelay.jenkins
Class WebhookRelayPlugin
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
com.webhookrelay.jenkins.WebhookRelayPlugin
- All Implemented Interfaces:
ExtensionPoint,Describable<GlobalConfiguration>,Saveable,Loadable,OnMaster
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) doCheckWebhookSecret(Secret webhookSecret, String scmPreset, String buckets) voiddoResolveWebhookUrl(org.kohsuke.stapler.StaplerResponse2 rsp, Secret apiKey, Secret apiSecret, String buckets, String scmPreset, Secret webhookSecret) Looks up the named Webhook Relay bucket (creating it with its default public input if it does not exist) and returns the public webhook URL to paste into the SCM provider's webhook settings.doTestConnection(Secret apiKey, Secret apiSecret, String buckets) static WebhookRelayPluginget()The Webhook Relay dashboard URL for the connected bucket (logs and settings), ornulluntil the bucket has been resolved (via Get Webhook URL or the first received webhook).Outcome of the last signature verification sync ("" if none ran).booleanbooleanvoidvoidsetApiSecret(Secret apiSecret) voidsetBuckets(String buckets) voidsetEnabled(boolean enabled) voidsetScmPreset(String scmPreset) voidsetWebhookSecret(Secret webhookSecret) Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
WebhookRelayPlugin
public WebhookRelayPlugin()
-
-
Method Details
-
get
-
getApiKey
-
setApiKey
-
getApiSecret
-
setApiSecret
-
getBuckets
-
setBuckets
-
isEnabled
public boolean isEnabled() -
setEnabled
@DataBoundSetter public void setEnabled(boolean enabled) -
getScmPreset
-
setScmPreset
-
getWebhookSecret
-
setWebhookSecret
-
getVerificationStatus
Outcome of the last signature verification sync ("" if none ran). -
isVerificationFailed
public boolean isVerificationFailed() -
getConnectionStatus
-
getStatusMessage
-
getBucketDetailsUrl
The Webhook Relay dashboard URL for the connected bucket (logs and settings), ornulluntil the bucket has been resolved (via Get Webhook URL or the first received webhook). -
getWebhookEndpointPath
-
doCheckWebhookSecret
@POST public FormValidation doCheckWebhookSecret(@QueryParameter("webhookSecret") Secret webhookSecret, @QueryParameter("scmPreset") String scmPreset, @QueryParameter("buckets") String buckets) -
doFillScmPresetItems
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configurein classGlobalConfiguration- Throws:
Descriptor.FormException
-
doTestConnection
@POST public FormValidation doTestConnection(@QueryParameter("apiKey") Secret apiKey, @QueryParameter("apiSecret") Secret apiSecret, @QueryParameter("buckets") String buckets) -
doResolveWebhookUrl
@POST public void doResolveWebhookUrl(org.kohsuke.stapler.StaplerResponse2 rsp, @QueryParameter("apiKey") Secret apiKey, @QueryParameter("apiSecret") Secret apiSecret, @QueryParameter("buckets") String buckets, @QueryParameter("scmPreset") String scmPreset, @QueryParameter("webhookSecret") Secret webhookSecret) throws IOException Looks up the named Webhook Relay bucket (creating it with its default public input if it does not exist) and returns the public webhook URL to paste into the SCM provider's webhook settings. The bucket is left without outputs so that webhooks stream over the socket to this plugin and every request is recorded on the bucket's logs page.- Throws:
IOException
-