Azure Pipelines
Covered in this doc
Integrating Percy with your Azure Pipeline Build environment
Configuring environment variables
Step 1: Add PERCY_TOKEN to your pipeline as a secret:
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:
- First
edit
your 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.
Step 2: Add PERCY_TOKEN to your build configuration:
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.
More information
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 almost 2 years ago
If you haven't installed and configured an SDK or source code integration, those are your next steps to getting started with visual testing.