GitLab Integration Guide
Send repository and pipeline events through webhooks.
Configure GitLab project or group webhooks to send event notifications to Harness AI SRE for deployments, pipelines, and security alerts.
Before you begin
Harness webhook endpoint: Create a GitLab webhook in Harness AI SRE using the GitLab webhook template.
GitLab permissions: Maintainer or Owner role for the project/group.
Webhook URL: Copy the webhook URL from your Harness webhook configuration.
GitLab webhooks documentation: Go to Webhooks for webhook configuration guide.
Webhook events reference: Go to Webhook Events for event-specific payload structures.
Create project webhook
Navigate to webhook settings
Go to your GitLab project
Click Settings, then click Webhooks
Expand Add new webhook
Go to your GitLab group
Click Settings, then click Webhooks
Click Add new webhook
Group webhooks receive events from all projects in the group.
Configure webhook
URL: Your Harness webhook URL
https://<your-harness-instance>/gateway/ai-sre/api/webhooks/<webhook-id>Secret token: (Optional) Sent as plain text for token comparison, not cryptographic signature verification
Trigger: Select events to trigger webhook
SSL verification: Enable SSL verification
URL: Your Harness webhook URL
Secret token: Enter a secure token
GitLab sends this in
X-Gitlab-TokenheaderHarness can verify this header
Trigger: Select events
SSL verification: Enable
URL: Your Harness webhook URL
Trigger: Select specific events
Common events for monitoring:
☑ Push events
☑ Tag push events
☑ Merge request events
☑ Pipeline events
☑ Deployment events
☑ Releases events
☐ Issues events (optional)
☐ Confidential issues events
☐ Merge request approval events
☐ Job events (optional)
Test webhook
Click Test, select the event type, then click the Test button.
GitLab sends a test payload to verify the webhook is reachable.
Add webhook
Click Add webhook to save.
Configure field mapping in Harness
GitLab webhook payload structure
Field mapping by event type
Available GitLab webhook headers
X-Gitlab-Event
Event type
Pipeline Hook, Deployment Hook, Release Hook
X-Gitlab-Token
Secret token, sent as plain text (if configured)
(if configured)
X-Gitlab-Instance
GitLab instance URL
https://gitlab.com
webhook-signature
HMAC-SHA256 signature (if a signing token is configured)
v1,<base64_signature>
webhook-id
Unique message ID used in signature computation
msg_2wF...
webhook-timestamp
Unix timestamp used in signature computation
1717000000
Next steps
Route alerts: Route GitLab events.
Use CEL in webhooks: Add advanced filtering.
GitLab template: Use the pre-configured template.
Related documentation
GitLab official documentation
Webhooks: Complete guide to GitLab webhook configuration and setup.
Webhook events: Event-specific payload structures (pipeline, deployment, release).
Pipeline events: Pipeline webhook payload structure and build details.
Deployment events: Deployment webhook payload and environment information.
Last updated
Was this helpful?