Skip to main content
No Result Found
Connect and get help from 7,000+ developers on our Discord community. Ask the CommunityAsk the Community

Integrate App percy with GoCD

Integrate App percy with GoCD, an open-source CI-CD server

Follow these steps to integrate App percy with GoCD:

Configuring GoCD 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 GoCD pipeline, go to Pipeline Settings > Environment Variables and add PERCY_TOKEN. Mark it as Secure so the value is hidden in build logs.

Alternatively, you can export the variable as part of your build script:

bash
Copy icon Copy

Commit, branch, and pull request information

App percy auto-detects GoCD builds via the GO_PIPELINE_NAME and GO_SERVER_URL environment variables and reads the following native GoCD variables:

  • GO_REVISION — commit SHA

GoCD does not natively expose branch or pull request information to the build environment. To populate these fields, 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.

bash
Copy icon Copy

Parallelized build processes

If you parallelize your build across multiple stages or jobs, PERCY_PARALLEL_TOTAL and PERCY_PARALLEL_NONCE need to be configured. App percy composes the parallel build nonce from GoCD’s GO_PIPELINE_COUNTER and GO_STAGE_COUNTER (in the format ${counter}.${stage}). 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





Thank you for your valuable feedback

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle