Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Latest commit

 

History

History
65 lines (40 loc) · 2.05 KB

how_to_setup_github_webhook.md

File metadata and controls

65 lines (40 loc) · 2.05 KB

How to set-up a GitHub webhook

The synchronisation of service configurations are stored in git repositories with Zookeeper nodes is implemented in siembol in config editor rest service.

Siembol config editor rest rest endpoint for webhooks

Find a hostname of siembol config editor rest and prepare URL.

URL parameters

  • serviceNames: Comma-separated list of service names or all if the hook is for all services
  • syncType: Type of synchronisation that should be triggered by the hook. One of:
    • ALL
    • RELEASE
    • ADMIN_CONFIG

Example URL:

Setting a webhook in a GitHub repository

For a git repository you should recognise:

  • services which configurations are stored in a git repository
  • type of configurations that are stored in the git repository

Prepare and test URL

You can prepare a URL using the above example or by using Swagger.

Example Swagger URL:

Ensure that the prepared URL is accessible form the GitHub server.

Set a webhook URL in GitHub

To set up a webhook:

  • Go to the settings page of your repository or organization in GitHub
  • Click Webhooks
  • Click Add Webhook
  • Add a Payload URL
  • Select 'Just the push event.'
  • Click Add webhook

Set the content type

Set the content type as application/json

Set the GitHub secret (optional)

Setting a webhook secret allows you to ensure that POST requests sent to siembol are from GitHub.

Set the secret for verification in config editor rest's application.properties file

The verification of webhook signature is computed only if is set the secret in the application properties of config editor rest. Otherwise this check is skipped.

config-editor.gitWebhookSecret=your_secret_provided_in_GitHub