Skip to content
Damien Coraboeuf edited this page Jun 13, 2016 · 4 revisions

GitHub connector

If configured, the plug-in exposes a hook for GitHub events.

The GitHub is optionally protected by a token. This token must be configured in the Seed configuration. The same token must be entered in the GitHub configuration of the web hook.

Seed configuration

The Seed used to generate a project must have its Type of trigger authorised parameter set to github.

GitHub configuration

On your project GitHub page, go to the Settings and to the Webhooks & Services section.

In the Webhooks panel, click on the Add webhook button (your GitHub password might be asked to confirm).

In the Payload URL, enter http://<jenkins>:<port>/seed-github-api/ where jenkins is the host name of your Jenkins instance, and port its port it runs on. Note also the trailing slash.

Leave the Content type to application/json.

If wished, enter a security key (see below). You can also disable the SSL verification when needed (not recommended but can be needed while testing on a test Jenkins instance).

In the event selection, select Let me select individual events and select the following events:

  • Delete
  • Create
  • Push (selected by default)

When done, click on the Add webhook button.

Now, whenever an event happens in your repository, the Seed hook will be called in your Jenkins instance.

Security

To enable security, generate a secure token using your favourite tool (or look at the GitHub documentation) and store it in your Seed configuration. It's better to use a distinct token per project, but nothing prevents you to store it in the global configuration.

See the [Quick start](Quick start) for an example of such a parameter for the secret token.

Clone this wiki locally