Skip to content

GitLab Webhook Setup

Connect your GitLab repository to Nebion for automatic deployments.

Before You Start

  • Created a project in Nebion (how?)
  • Maintainer or Owner access to your GitLab project
  • Webhook URL, secret, and deploy key from your Nebion project page (under Setup)
  1. Add Deploy Key

    In Nebion, copy the Deploy Key from your project page. In GitLab, go to Settings > Repository > expand Deploy keys. Set title to Nebion Deploy Key, paste the public key, leave Grant write permissions unchecked, and click Add key.

  2. Create Webhook

    In GitLab, go to Settings > Webhooks. Fill in:

    FieldValue
    URLPaste the Webhook URL from Nebion
    Secret tokenPaste the Webhook Secret from Nebion
    SSL verificationEnable SSL verification

    Under Trigger, check only Merge request events. Click Add webhook.

  3. Test It

    Create a test branch and merge request:

    bash
    git checkout -b test-nebion
    echo "test" >> README.md
    git add . && git commit -m "Test Nebion webhook"
    git push origin test-nebion

    Create a merge request on GitLab for this branch. In Nebion, check your project page — a new pr-{number} environment should appear. Once the deployment status shows SUCCESS, click the environment URL to verify.

WARNING

Keep the webhook secret secure. Do not commit it to your repository.

TIP

Make sure your repository URL in Nebion uses SSH format: git@gitlab.com:namespace/project.git

If the environment doesn't appear, click Edit on your webhook in GitLab and check Recent events for delivery status.