Skip to main content

Set the GitLab webhook secret

A webhook lets GitLab tell Astrolabe right away when something happens, for example a pipeline that failed, instead of Astrolabe finding out a few minutes later. Astrolabe only trusts a call signed with a secret you both know.

You do it once, as an administrator.

Before you start​

Choose a secret: a long random text. You enter the same one in GitLab.

🔧 Save the secret in Astrolabe​

  1. In the left sidebar, at the bottom, click Administration.

  2. Under PLATFORM, click Company connections.

  3. Click the Webhooks tab.

  4. On the GitLab card, click Configure.

  5. In the window Configure GitLab Secret, next to Webhook URL, click Copy address. The button says Copied. Keep that address: you paste it in GitLab below.

  6. Fill in the field:

    FieldWhat to enterExample
    Webhook URLNothing to type: the address GitLab calls, copied in the previous stephttps://astrolabe.acme.example/api/orion-events/gitlab
    Webhook SecretThe secret, which verifies the webhook requestsa-long-random-text
  7. Click Save Secret.

  8. In the banner The configuration has changed., click Reload.

The card now says No call received since Astrolabe started. and offers Manage.

Change or remove the secret

Click Manage. Replace lets you type a new secret, Delete removes it. The window shows the address again each time.

In your GitLab project, add a webhook: the address you copied is its URL, and the secret is its token. This step was not checked on a live instance.

✅ That's it!

Next: Check that GitLab reaches Astrolabe.