Skip to main content
AI agents are now live in Website Scanner! Enter your URL and fix website issues 3x faster with AI. Explore now!
No Result Found
Connect and get help from 7,000+ developers on our Discord community. Ask the CommunityAsk the Community

Integrate Percy with Atlassian Bamboo

Integrate Percy with Atlassian Bamboo, a popular CI-CD tool

Follow these steps to integrate Percy with Atlassian Bamboo:

Configuring Bamboo environment variables

Start by configuring PERCY_TOKEN, our project-specific, write-only API token. It can be found in your Percy project settings.

In your Bamboo plan, go to Plan configuration > Variables and add PERCY_TOKEN as a variable. Mark the variable as a password to keep it secret.

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

bash
Copy icon Copy

Commit, branch, and pull request information

Percy auto-detects Bamboo builds via the bamboo_buildKey environment variable and reads the following native Bamboo variables:

  • bamboo_planRepository_revision — commit SHA.
  • bamboo_planRepository_branchName — branch name.
  • bamboo_repository_pr_key — pull request identifier (when available).

Bamboo exposes these variables to the build environment with underscores (bamboo_planRepository_revision) but displays them in the Bamboo UI with dots (bamboo.planRepository.revision). The two refer to the same value — use the underscore form in scripts and shell commands.

If any of these are not set in your environment, configure your environment to include PERCY_COMMIT, PERCY_BRANCH, and PERCY_PULL_REQUEST. See the environment variables docs page for more details.

Run your tests

With your environment configured, run your Percy snapshots via your test suite or another mechanism. Your Percy build will be created with the correct meta-data.

bash
Copy icon Copy

Parallelized build processes

If you parallelize your build across multiple agents or jobs, PERCY_PARALLEL_TOTAL and PERCY_PARALLEL_NONCE need to be configured. Percy automatically uses Bamboo’s bamboo_buildResultKey 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





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