You can use Buildless as a drop-in remote build cache with Turborepo. To set things up, follow the directions below.
Before you configure Maven with Buildless, you'll need to setup your account and obtain your API key. You can sign up for Buildless here. To locate your API key, it depends which kind of key you want to use:
- For individual users: Your API key is located in the welcome email and in your user settings, accessed from the Buildless Console.
- For tenant users who wish to authorize an org-level cache (with no specific user), access your org API key in the Buildless Console at Tenant → Settings → Integration.
The easiest and most secure way to use Buildless is via the environment variables and CLI config files. These techniques for configuring the cache keep your API key out of your source code.
Once you obtain your API key, set it in your environment via
echo "export BUILDLESS_APIKEY=..." >> ~/.bashrc
In order to use the remote caching feature, Turborepo repositories must first be linked to a cache provider. To do this, run the following command, taking notice of the additional arguments to ensure Buildless is being configured properly
npx turbo link --api="https://turbo.less.build/turbo" --token=$BUILDLESS_APIKEY
Follow the instructions to select the scope of the cache (currently only account scopes are supported), and enable remote caching for this repository.
Unlike with the traditional setup process for Turborepo, there is no need to use
turbo loginwith Buildless, since the
--tokenargument specifies user credentials using a Buildless API Key.
After linking the repository, use the following arguments when calling
turbo to use Buildless:
npx turbo build --api="https://turbo.less.build" --token=$BUILDLESS_APIKEY
Updated 3 months ago