The Simplest Way to Make Buildkite and Cohesity Work Like They Should
You pair buildkite and cohesity to automate data backups and test clones inside your build pipelines. Buildkite runs the job steps, while Cohesity takes snapshots and restores test data on demand. This setup lets teams test new code against fresh data copies before every release. It also backs up build artifacts and databases before a deployment changes your live system. How buildkite and cohesity share permissions and data Buildkite uses local agents on your own servers to run build and dep
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You pair buildkite and cohesity to automate data backups and test clones inside your build pipelines. Buildkite runs the job steps, while Cohesity takes snapshots and restores test data on demand.
This setup lets teams test new code against fresh data copies before every release. It also backs up build artifacts and databases before a deployment changes your live system.
How buildkite and cohesity share permissions and data
Buildkite uses local agents on your own servers to run build and deploy scripts. Those agents talk to the Cohesity cluster API to trigger snapshots or clone volumes. The agent needs a valid API key or role token to log in to Cohesity.
During a pipeline run, the Buildkite agent sends a request to the Cohesity cluster. Cohesity checks the token permissions and starts the backup or clone task. When the task finishes, Cohesity returns the status and mount path to the agent.
The agent then runs database migrations or integration tests against that mounted data clone. If the tests pass, the pipeline cleans up the clone and moves to deployment. This flow keeps production data safe while giving developers realistic test datasets.
When test clones hold customer info, data masking rewrites matched fields in results. For example, masking replaces emails, phone numbers, card numbers, or national IDs during queries. This protects sensitive records while test jobs run on your build servers.
Common failure modes and how to scope roles
Many teams fail by giving one broad Cohesity admin token to every Buildkite agent. If a build script leaks that token in a log, anyone can delete backups. Shared service accounts also make it impossible to see which pipeline triggered a change.
Another common issue is leaving network paths open between all build agents and backup storage. A compromised dependency in a test job could reach the backup API directly. Unlogged API calls also leave security teams blind during an audit.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, create separate Cohesity roles for each pipeline group or team. Give test pipelines permission to mount clones, but never let them delete production snapshots. Give release pipelines permission to trigger new backups before they run database changes.
Store API keys in a dedicated secret store instead of plain pipeline variables. Rotate those keys on a regular schedule so old tokens cannot cause harm. Restrict network routing so only designated deployment agents can talk to the Cohesity API.
Keeping pipeline data tasks fast and auditable
Good pipeline design keeps backup steps separate from standard unit test steps. Run fast unit tests first so broken code fails early without touching storage. Only trigger Cohesity clone or snapshot tasks after the basic code checks pass.
Tag every Cohesity request with the Buildkite build number and the git commit hash. This links every storage snapshot or test clone back to the exact code change. When a release fails, your team can find the matching backup right away.
Set clear expiration rules on every test clone that a Buildkite pipeline creates. If a build crashes mid-run, the storage cluster will still clean up old volumes. This stops orphaned test clones from filling up your storage pool over time.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Why connect a build tool to a backup platform?
Connecting them lets your pipeline take automatic snapshots right before a production deployment starts. It also lets test jobs spin up thin data clones to test database changes safely.
How should Buildkite agents log in to Cohesity?
Each agent queue should use a scoped role with only the permissions its jobs need. Pull short-lived tokens at job start rather than storing static admin passwords on the host.
How do we stop test pipelines from exposing customer data?
Use data masking to rewrite emails, phone numbers, and card numbers in query results. Also restrict clone permissions so test agents can only read from approved backup views.
Related guides
In this post