CI Build ID
Using --ci-build-id for Playwright and Cypress tests parallelization
What is CI Build ID?
CI Build ID is a unique identifier used by Currents to collect test results. Think of it as a "folder" on a virtual hard drive. For example, when multiple CI machines run tests in parallel, their combined results will appear together if they use the same CI Build ID.
results with
--ci-build-id build001
will go tobuild001
"folder" (we call it a run)results with
--ci-build-id build002
will go tobuild002
"folder"
Creating a CI Build ID
You can choose between leveraging our auto-detection algorithm, or manually generating a CI Build ID.
Auto detection by Currents
Currents will automatically detect a CI Build ID for popular CI providers based on the presence of environment variables. Please refer to Build ID for popular CI providers to see the environment variables used for each provider.
Otherwise, if not explicitly provided, Currents will generate a random unique id.
Explicit value
You can also specify CI Build ID explicitly.
With the CLI, you can use the --ci-build-id
flag, for example:
In order to manually construct a CI Build ID that is unique for each build (but similar across all the parallel machines) it is recommended to use your CI provider's environment variables that combine pipeline/workflow/build identifier and also an attempt number.
For example, for GitHub Actions:
Refer to your CI provider documentation for the list of available environment variables.
Parallelization
Cypress Parallelization and Playwright Orchestration allows running your tests in parallel. Collecting and combining the results from multiple machines requires to use the same CI Build ID.
Using unique CI Build ID in different builds
Imagine a CI pipeline running tests in parallel using multiple machines. Starting two builds with a different CI Build ID will create 2 distinct "Runs" in Currents dashboard.
The parallelization and reporting will happen for each build independently from the other. That is usually the desired situation - each build should have a unique CI Build ID.
Using the same CI Build ID in different builds
In contrast, consider a situation when 2 different builds use the same CI Build ID. That's an uncommon situation, but it's worth demonstrating for understanding the use of CI Build ID.
We created two different builds with the same CI Build ID. That will result in 6 machines reporting their results to the same run.
Build ID for popular CI providers
Currents will try to automatically detect the CI provider by looking at the environment variables and picking the best combination.
If the variables are not found, Currents will fall back to a simpler combination.
AppVeyor
APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH
APPVEYOR_BUILD_NUMBER
APPVEYOR_BUILD_NUMBER
Azure
BUILD_BUILDID
AWS Code Build
CODEBUILD_BUILD_ID
CODEBUILD_SOURCE_VERSION
CODEBUILD_BUILD_ID
Bamboo
bamboo_buildKey
bamboo_buildNumber
bamboo_buildKey
Bitbucket
BITBUCKET_REPO_SLUG
BITBUCKET_BUILD_NUMBER
BITBUCKET_BUILD_NUMBER
Buildkite
BUILDKITE_BUILD_ID
CircleCI
CIRCLE_WORKFLOW_ID
CIRCLE_BUILD_NUM
Codeship
CI_REPO_NAME
CI_BUILD_ID
CI_BUILD_ID
Concourse
BUILD_ID
BUILD_NAME
BUILD_ID
CodeFresh
CF_BUILD_ID
CF_CURRENT_ATTEMPT
CF_BUILD_ID
Drone
DRONE_PULL_REQUEST
DRONE_BUILD_NUMBER
DRONE_BUILD_NUMBER
GitHub Actions
GITHUB_REPOSITORY
GITHUB_RUN_ID
GITHUB_RUN_ATTEMPT
GITHUB_RUN_ID
GitLab
CI_PIPELINE_ID
GoCD
GO_REVISION
GO_PIPELINE_COUNTER
GO_REVISION
Google Cloud
REPO_NAME
BUILD_ID
BUILD_ID
Jenkins
BUILD_NUMBER
Semaphore
SEMAPHORE_GIT_REPO_SLUG
SEMAPHORE_PIPELINE_ID
SEMAPHORE_PIPELINE_ID
TeamFoundation
BUILD_BUILDID
BUILD_BUILDNUMBER
BUILD_BUILDID
Travis
TRAVIS_REPO_SLUG
TRAVIS_BUILD_ID
TRAVIS_BUILD_ID
Netlify
BUILD_ID
FAQ
Last updated