Integrate Percy with GitLab CI
Integrate Percy with GitLab CI, a popular CI-CD tool
Follow these steps to integrate Percy with GitLab CI:
Configuring environment variables
Start by configuring PERCY_TOKEN
, our project-specific, write-only API token. It can be found in your Percy project settings and can easily be added to your GitLab build pipeline config or agent hooks.
Shown below is a minimal CI config that has the necessary variables to make Percy work smoothly. If you’re using docker in GitLab’s CI, make sure these are passed into your container:
To configure environment variables, navigate to your GitLab repository, then go to Settings > CI/CD and then expand the Variables section.
Then set PERCY_TOKEN
to the write-only token from your Percy project. This token can be found in each Percy project’s settings.
Keep your Percy token secret.
Anyone with access to your Percy token can add builds to your project, though they cannot read data. If your code is public, do not commit the PERCY_TOKEN to your code.
Reference Topic
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!