Buildkite
The following example shows how to use Turborepo with Buildkite.
For a given root package.json
:
And a turbo.json
:


Create a file called .buildkite/pipeline.yml
in your repository with the following contents:
Create a Pipeline
To create your pipeline in the Buildkite dashboard, you'll need to first upload the pipeline definition from your repository.
-
Select Pipelines to navigate to the Buildkite dashboard.
-
Select New pipeline.
-
Enter your pipeline's details in the respective Name and Description fields.
-
In the Steps editor, ensure there's a step to upload the definition from your repository:
- Select Create Pipeline, then click New Build, then select Create Build.
Run the pipeline whenever you make changes you want to verify.
Remote Caching
To use Remote Caching, retrieve the team and token for the Remote Cache for your provider. In this example, we'll use Vercel Remote Cache:
TURBO_TOKEN
- The Bearer token to access the Remote CacheTURBO_TEAM
- The account to which the monorepo belongs
To use Vercel Remote Caching, you can get the value of these variables in a few steps:
-
Create a Scoped Access Token to your account in the Vercel Dashboard. Copy the value to a safe place. You'll need it in a moment.
-
Obtain your Team URL and copy its value as well. Both values will be used in the next step.
-
In the Buildkite dashboard, create two new Buildkite secrets, one for each value. Name them
TURBO_TOKEN
andTURBO_TEAM
. -
Update
pipeline.yml
to fetch and applyTURBO_TOKEN
andTURBO_TEAM
as environment variables with the Buildkite Secrets plugin as shown. (For additional secret-management options, read Managing pipeline secrets in the Buildkite documentation.).buildkite/pipeline.yml Commit and push these changes to your repository, and on the next pipeline run, the secrets will be applied and Vercel Remote Caching will be active.