Covered in this doc
Integrating Percy with your Bitbucket Pipelines environment
Start by configuring
PERCY_TOKEN, our project-specific, write-only API token. It can be found in your Percy project settings and set via your Bitbucket Pipelines settings.
Bitbucket Pipelines provide a variety of ways to configure environment variables. Because each Percy project is usually associated with just one repository, we recommend setting
PERCY_TOKEN up as a repository variable, and making it secure.
In your Bitbucket project go to Settings > Pipelines > Respository Variables.
PERCY_TOKEN to the write-only token from your Percy project. The token value 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.
For Bitbucket Pipelines, make sure the "Secure" checkbox is checked.
With the addition of the PERCY_TOKEN repository variable, any snapshots you take in this pipeline will be sent to the associated Percy project. Percy will automatically detect the commit SHA, branch name, and pull request number from the Pipelines environment.
Updated about a year ago