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 Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) voiddoResolveWebhookUrl(org.kohsuke.stapler.StaplerResponse2 rsp, Secret apiKey, Secret apiSecret, String buckets, String scmPreset) 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).booleanvoidvoidsetApiSecret(Secret apiSecret) voidsetBuckets(String buckets) voidsetEnabled(boolean enabled) voidsetScmPreset(String scmPreset) Methods inherited from class GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPageMethods inherited from class 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
-
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
-
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) 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
-