Covered in this doc
Integrating Percy with your GitLab CI environment
This doc will walk you through implementing Percy into your GitLab CI environment. See separate docs to integrate with GitLab.com.
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:
--- test: variables: - GITLAB_CI - CI_COMMIT_SHA - CI_COMMIT_REF_NAME - CI_JOB_ID - CI_SERVER_VERSION - CI_MERGE_REQUEST_IID - PERCY_TOKEN
To configure environment variables, navigate to your GitLab repository, then go to Settings > CI/CD > and then expand the Variables section.
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 token can add builds to your project, though they cannot read data.
Updated over 3 years ago