- Send merge request events from GitLab to PagerDuty services in order to provide context for anyone using PagerDuty.
- Responders may review change events within a PagerDuty service’s Recent Activity timeline during incident triage or hypercare. They can also see recent changes on the service’s incidents, and review all changes in a comprehensive list of Recent Changes across all services.
In PagerDuty: This integration requires a Manager base role or higher to configure.
In GitLab: This integration requires a Maintainer, Admin or Owner role to configure.
- When a
merge_requestevent occurs within a GitLab repository, a webhook will be sent to the endpoint of the integrated PagerDuty service.
- These events will be viewable as change events in the service’s Recent Activity timeline, on incidents associated with that service, and in a global list of all changes. They will not generate alerts, incidents or notifications.
We recommend mapping your GitLab events to the PagerDuty service that represents what you are changing. This will make it easy for responders to quickly identify recent changes on their service when they get notified for an incident.
- In your PagerDuty account, navigate to Services Service Directory and click the name of your preferred service.
- Select the Integrations tab and click Add an integration.
- Search for and select GitLab, and click Add.
- In the list of integrations, click to the right of the GitLab integration.
- In the section Integration URL, click to copy the integration URL to your clipboard. It will be in the following format:
https://events.pagerduty.com/integration/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/change/enqueue. Keep this URL in a safe place for use in the next section.
By default, the integration tracks changes on your
master branch. If you’d like to change which branch is tracked, or track multiple branches, you can do this in the web app. If you do not wish to change which branch is tracked, please skip ahead to the next section In GitLab.
- Navigate to Services Service Directory and click the name of the service with your GitLab integration.
- Select the Integrations tab and click to the right of the GitLab integration.
- On the right-hand side, click Edit Integration.
- In the field branch, enter the name of the branch you’d like to track.
Note: If you would like to track multiple branches, add a space between each branch’s name, for example:
feature-branch-1 feature-branch-2 feature-branch-3.
- Click Save changes.
- Navigate to the GitLab project where you would like to track changes. In the left-side menu select Settings Webhooks.
- Paste the Integration URL you generated in PagerDuty (above) into the URL field.
- Under the Trigger header, deselect Push events and select Merge request events.
- Click Add webhook.
After you’ve added a webhook to your GitLab project, you can test the integration by creating a merge request in the project. In the PagerDuty web app, navigate to the integrated service, click its title, and you will see an entry in the Recent Changes section:
Not at this time, but we are interested to learn about what you would like to accomplish. Please contact our Support team with your use case and feedback.
Yes, you can add any number of integrations to a single service, including multiple GitLab integrations. Please see the section Branch Tracking for information about customizing which branch an integration is associated with.
Not at this time, but we would like to hear your feedback. Please contact our Support team with your feedback.
Updated 4 months ago