GitLab Self-managed
To integrate with GitLab.com, see our GitLab.com documentation.
If you are running GitLab Self-Managed behind a firewall, see Enterprise firewalls. If that doesn’t work, fill out the form below.
If you have two different organizations on BrowserStack and a single GitLab organization, use GitLab self-managed integration, enter https://gitlab.com
in the host field, and follow the instructions on this page. Ensure you use a distinct application name for each integration.
The GitLab installation ID is unique, so keep in mind:
- Main organization integrations are accessible to sub-organizations. However, sub-organization integrations are not accessible to other sub-organizations.
- If a sub-organization has already added the GitLab application, it needs to remove it from its integrations. The application should be added to the main organization so that all its sub-organizations can access it.
- Organizations outside the same enterprise group cannot install the GitLab app on both organizations.
Installing the Percy GitLab Self-Managed integration
Create a GitLab Bot User
Percy uses a personal access token to update commit statuses on GitLab. These API calls are made on behalf of a GitLab user that you specify when you generate a personal access token. You may wish to create a separate GitLab user that has access to only the GitLab projects you wish to integrate with Percy. This allows you to restrict the scope of the API access you provide us and make it clear to your organization how commit statuses are being set.
Create a new user on in your GitLab organization. We recommend calling it Percy, so it’s easily identified.
In GitLab, go to the project you want to integrate Percy with and grant your bot user “Developer” access to it.
- Go to https://gitlab.com/[orgname]/[project]/project_members
- Grant the bot user you created above with access to your projects using the role “developer,” like this:
The end result should look like this:
Generate a Personal Access Token
Once you have created a bot user and invited them to the GitLab project you intend to use with Percy, generate a personal access token with the following values:
Add the Personal Access Token and GitLab Host to Percy
You’re ready to add your GitLab details to Percy. Go to your Organization Settings > Integrations and paste the personal access token and GitLab Host into the form field.
You’ve now installed the GitLab integration! The next step is to connect GitLab repositories to your Percy projects.
Linking projects and GitLab repositories
You can manage your linked repositories by editing the settings for the GitLab self-managed integration under Organization Settings > Integrations.
Done! 🚀 You’re ready to start running visual testing alongside code reviews.
Troubleshooting
If you find your integration is not working as expected, check the integration logs on the GitLab Enterprise integration page. These can be found by selecting Edit settings under Organization Settings > Integrations.
The logs table will show you all the communication Percy has recently had with GitLab Enterprise. If there is not a recent log line, you can click the Run health check button to create a new log from GitLab Enterprise.
Support for GitLab Self-Managed behind a firewall
If you are running GitLab Self-Managed behind a firewall, reach out to our sales team for assistance.
Next step
Learn about our additional workflow features like snapshot carryforward, auto-approved branches, baseline picking, and more.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!