Covered in this doc
Integrating Percy with your Azure Pipeline Build environment
Start by configuring
PERCY_TOKEN, our project-specific, write-only API token. It can be found in your Percy project settings and set in your pipeline's variables as a secret. Remember to click the padlock to encrypt the variable.
In your Azure pipeline:
- Click on the kebab menu and choose variables.
- Add a variable named
PERCY_TOKEN, with the value set to the write-only token from your Percy project. This token can be found in each Percy project's settings. Remember to click the padlock to encrypt it.
- Save your changes.
Azure's docs show how the PERCY_TOKEN secret can be added to your azure-pipelines.yml file in the env section. i.e.:
- script: | npm install npm run test env: PERCY_TOKEN: $(PERCY_TOKEN)
Keep your Percy token secret
Anyone with access to your token can add builds to your project, though they cannot read data.
If you're working on a public open source project, you may want Percy to run on builds from forks of your repository. The Azure Pipelines documentation titled Validate contributions from forks will be of interest to you.
Updated 2 months ago