Integrate App percy with Tekton Pipelines
Integrate App percy with Tekton Pipelines using opt-in detection
Follow these steps to run App percy visual tests as part of your Tekton pipelines and surface build context (commit, branch, and pull request) on every PipelineRun.
Tekton Pipelines does not auto-inject identifying environment variables into step containers.
To enable detection, expose the variables below via template substitution in your PipelineRun definition.
Configuring environment variables
Add the following environment variables to your App percy step in your Tekton Task or PipelineRun definition. Use Tekton’s variable substitution to map context and parameter values to the TEKTON_* variables App percy reads.
Variable reference
| Variable | Required | Maps to | Notes |
|---|---|---|---|
TEKTON_PIPELINE_RUN |
Yes | Detection trigger and PERCY_PARALLEL_NONCE
|
Set to $(context.pipelineRun.name). Without this, App percy does not auto-detect Tekton. The same value also serves as the parallel build nonce — required if you parallelize across steps within a PipelineRun. |
TEKTON_COMMIT_SHA |
Yes | PERCY_COMMIT |
Set to your commit SHA parameter (typically passed in via Git resolver or pipeline param). |
TEKTON_BRANCH |
Yes | PERCY_BRANCH |
Set to your branch name parameter. |
TEKTON_PULL_REQUEST |
No | PERCY_PULL_REQUEST |
Optional. Set when the build is associated with a pull request. |
PERCY_TOKEN |
Yes | — | Your project-specific, write-only API token. Store in a Kubernetes Secret and reference via secretKeyRef. |
For more details on overriding commit, branch, and pull request information, see the environment variables docs page.
Keep your Percy token secret.
Anyone with access to your Percy token can add builds to your project, though they cannot read data. If your code is public, do not commit the PERCY_TOKEN to your code.
Reference Topic
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!