Integrate App percy with TeamCity
Integrate App percy with TeamCity, a popular CI-CD tool
Follow these steps to integrate App percy with TeamCity:
Configuring TeamCity environment variables
Start by configuring PERCY_TOKEN, our project-specific, write-only API token. It can be found in your App percy project settings.
In your TeamCity project, go to Edit Project > Parameters > Add new parameter and add PERCY_TOKEN as an environment variable (env.PERCY_TOKEN). Mark it as a password to keep it secret.
Alternatively, you can export the variable as part of your build script:
Commit, branch, and pull request information
App percy auto-detects TeamCity builds via the TEAMCITY_VERSION environment variable and reads commit information from BUILD_VCS_NUMBER, which TeamCity sets automatically.
If your branch or pull request information is not auto-detected, configure your environment to include PERCY_BRANCH and PERCY_PULL_REQUEST. See the environment variables docs page for more details.
Run your tests
With your environment configured, run your App percy snapshots via your test suite or another mechanism. Your App percy build will be created with the correct meta-data.
Parallelized build processes
If you parallelize your build across multiple agents or build configurations, PERCY_PARALLEL_TOTAL and PERCY_PARALLEL_NONCE need to be configured. App percy automatically uses TeamCity’s BUILD_NUMBER as the parallel build nonce. Set PERCY_PARALLEL_TOTAL to the total number of parallel builds.
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!