Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58942

Configurable webhook URL

XMLWordPrintable

      One of the common problems with triggering Jenkins builds from webhooks rather than polling is that notifications can be lost because the server is temporarily down or unresponsive, which you might try to address by having an external service queue up hooks for later delivery. Another is that Jenkins may be behind a firewall and need for hooks to be proxied through some sort of service.

      Whatever the case, something other than Jenkins.rootUrl needs to be used to register the webhook, for example on a GitHub organization. While administrators can remember to do this manually, creating an organization folder does this automatically—but only for the default location. There should be a way to override the Jenkins root URL for purposes of hook registration. This is not something you would want to configure in the GUI; it is a property of the environment in which Jenkins is installed, perhaps managed via code.

      As an initial step I am just letting the github-branch-source plugin pick up an environment variable for an alternative URL. A possible refinement would be for JenkinsLocationConfiguration to define this (means a newer core dependency), and perhaps for the location to be configurable using JCasC.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: