Class WebhookRelayPlugin

All Implemented Interfaces:
ExtensionPoint, Describable<GlobalConfiguration>, Saveable, Loadable, OnMaster

@Extension public class WebhookRelayPlugin extends GlobalConfiguration
  • Constructor Details

    • WebhookRelayPlugin

      public WebhookRelayPlugin()
  • Method Details

    • get

      public static WebhookRelayPlugin get()
    • getApiKey

      public Secret getApiKey()
    • setApiKey

      @DataBoundSetter public void setApiKey(Secret apiKey)
    • getApiSecret

      public Secret getApiSecret()
    • setApiSecret

      @DataBoundSetter public void setApiSecret(Secret apiSecret)
    • getBuckets

      public String getBuckets()
    • setBuckets

      @DataBoundSetter public void setBuckets(String buckets)
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      @DataBoundSetter public void setEnabled(boolean enabled)
    • getScmPreset

      public String getScmPreset()
    • setScmPreset

      @DataBoundSetter public void setScmPreset(String scmPreset)
    • getConnectionStatus

      public ConnectionStatus getConnectionStatus()
    • getStatusMessage

      public String getStatusMessage()
    • getBucketDetailsUrl

      public String getBucketDetailsUrl()
      The Webhook Relay dashboard URL for the connected bucket (logs and settings), or null until the bucket has been resolved (via Get Webhook URL or the first received webhook).
    • getWebhookEndpointPath

      public String getWebhookEndpointPath()
    • doFillScmPresetItems

      public ListBoxModel doFillScmPresetItems()
    • configure

      public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException
      Overrides:
      configure in class GlobalConfiguration
      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