Appearance
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)
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.Create Webhook
In GitLab, go to Settings > Webhooks. Fill in:
Field Value URL Paste the Webhook URL from Nebion Secret token Paste the Webhook Secret from Nebion SSL verification Enable SSL verification Under Trigger, check only Merge request events. Click Add webhook.
Test It
Create a test branch and merge request:
bashgit checkout -b test-nebion echo "test" >> README.md git add . && git commit -m "Test Nebion webhook" git push origin test-nebionCreate 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.