Covered in this doc
Integrating Percy into your Harness CI environment
Configuring Environment Variables
Start by finding the write-only
PERCY_TOKEN—the project-specific API token—for the Percy project you want to integrate into your Harness CI Build Pipeline. It can be found at the top of the Project settings section in your Percy project.
Keep your Percy token secret
Anyone with access to your token can add builds to your project, though they cannot read data.
Next, go to Project Setup > Secrets inside your Harness CI module for the project you want to integrate with Percy and click + New Secret: select the Text option.
Secrets Managers Vary
The following instructions will give you a step-by-step procedure to add the token using the Harness Built-in Secrets Manager. If you're using a different secrets manager with Harness, there could be some variation in the specifics of how you set and reference your
PERCY_TOKENvalue inside your Pipeline—for more information, go to Reference Existing Secret Manager Secrets
PERCY_TOKEN to Harness CI
PERCY_TOKENto Harness CI
Now you need to add the token as a secret so you can use it in your Build Pipeline.
Set the secret name as
PERCY_TOKEN and add the write-only token in the Secret Value text box, then save.
If you're editing the pipeline as YAML, add the following two lines in the step where you're using Percy:
envVariables: PERCY_TOKEN: <+secrets.getValue("PERCY_TOKEN")>
Otherwise, click on the Run step where you want to use Percy and then click Optional Configuration to reveal the additional options.
In the Environment Variables section, click the
+ Add button and then enter
PERCY_TOKEN in the left field and
<+secrets.getValue("PERCY_TOKEN")> in the right.
Updated 6 months ago