CI provider
Cacheport with Buildkite
Buildkite agents run on your own infrastructure, often in autoscaling groups that come and go. Cacheport gives every new agent a warm cache from the first job.
- Config
- pipeline.yml
- Token
- Agent environment hook or secrets plugin
- Fleet
- All agents share one cache
- Region
- Pick the one closest to your agents
Give your pipelines a token
Load the token from your secrets manager in the agent's environment hook, so pipelines never see where it comes from.
#!/bin/bash
set -euo pipefail
export CACHEPORT_TOKEN="$(aws secretsmanager get-secret-value --secret-id cacheport-token --query SecretString --output text)"Examples
Copy-ready configuration for common setups.
npm
steps:
- label: ":npm: test"
command:
- echo "registry=https://acme.cacheport.cc/npm/" > .npmrc
- echo "//acme.cacheport.cc/npm/:_authToken=$${CACHEPORT_TOKEN}" >> .npmrc
- npm ci
- npm testGo
steps:
- label: ":go: test"
env:
GOPROXY: https://acme.cacheport.cc/go,direct
command:
- printf "machine acme.cacheport.cc login ci password %s\n" "$$CACHEPORT_TOKEN" > ~/.netrc
- go test ./...Escaping in pipeline.yml
Buildkite interpolates $VAR when it uploads the pipeline. Write $$CACHEPORT_TOKEN so the variable is expanded on the agent at run time, not at upload time.
FAQ
Questions
Does every agent need its own token?
No. One read token for the fleet is fine; rotate it in your secrets manager.
Can agents in several regions share a workspace?
Yes. Business and Enterprise workspaces can serve from more than one region.
Does it work with the Elastic CI Stack for AWS?
Yes. Put the token export in the stack's environment hook.
Other CI providers
Setting up somewhere else too?
Start on the free plan
20 GB of cache, every registry, unlimited users. Upgrade when your pipelines outgrow it.