The Simplest Way to Make Buildkite and Dataproc Work Like They Should
Teams pair buildkite and dataproc to test, package, and run big data jobs in production. Buildkite runs your pipeline steps on self-hosted agents, while Dataproc runs Spark and Hadoop clusters. This pairing lets engineers turn code commits into data jobs right away. Buildkite builds the job files and uploads them to cloud storage. Then the agent tells Google Cloud to start a cluster or submit a job. When you set up both tools well, you ship data changes fast and safe. How buildkite and datapr
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.
Teams pair buildkite and dataproc to test, package, and run big data jobs in production. Buildkite runs your pipeline steps on self-hosted agents, while Dataproc runs Spark and Hadoop clusters.
This pairing lets engineers turn code commits into data jobs right away. Buildkite builds the job files and uploads them to cloud storage. Then the agent tells Google Cloud to start a cluster or submit a job. When you set up both tools well, you ship data changes fast and safe.
How buildkite and dataproc share permissions and data
To make buildkite and dataproc work together, your build agent needs a Google Cloud identity. Most teams run Buildkite agents on cloud virtual machines or Kubernetes nodes. You should link the agent identity to a Google Cloud service account. Workload identity federation lets the agent trade its local token for a short cloud token.
That cloud token lets the agent call the Dataproc API without static keys on disk. Next, the build step compiles your code and writes the package to a storage bucket. The agent then calls the Dataproc API to submit the job to a cluster. Dataproc uses its own worker service account to read that bucket and process the data.
You must keep the agent role separate from the cluster worker role. The Buildkite agent only needs permission to submit jobs and check their status. The Dataproc cluster role needs permission to read raw tables and write output files. Keeping these two identities apart stops build scripts from reading production data directly.
Common failure modes and how to scope roles
Many teams fail by giving one shared service account to every Buildkite pipeline. When every build uses the same broad role, any branch can touch production clusters. A test branch could drop a live table or read restricted customer records by mistake. Static JSON key files stored in pipeline variables also create a huge risk for leaks.
Unlogged cluster actions cause another major headache for data and security teams. When ten engineers trigger builds under one shared account, cloud logs hide who ran what. You cannot tell which person submitted a slow query or changed a cluster setting. Data masking is also missing when raw emails or card numbers sit in test buckets.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, give each Buildkite queue its own scoped cloud service account. Map your staging queue to a staging project and your production queue to production. Restrict the network path so only private agent subnets can reach the cluster control plane. Turn on data masking to rewrite emails, phone numbers, and card numbers in query results.
Running ephemeral clusters from your build steps
Long-running clusters cost more money and accumulate state drift between test runs. A better pattern is to create a fresh Dataproc cluster for each big pipeline run. Your Buildkite step requests a new cluster, waits for it, and submits the Spark job. You can also use serverless Spark batches when you do not need custom node settings.
Always set an idle delete timer on every test cluster you create from a build. If a Buildkite job crashes or gets canceled, the cloud timer still deletes the cluster. This simple rule saves cloud spend and keeps orphaned nodes off your network. Your team gets clean test runs every time without manual cleanup work.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
How should Buildkite agents log in to Google Cloud for Dataproc jobs?
Use workload identity federation or attached virtual machine service accounts instead of static key files. This method gives the agent short tokens that expire after the build step finishes.
Should Buildkite agents and Dataproc nodes share the same service account?
No, you should always split them into two distinct roles. Give the Buildkite agent role job submission rights, and give the Dataproc node role storage rights.
How do we stop test pipelines from touching production Dataproc clusters?
Run separate Buildkite agent queues for test and production workloads. Bind each queue to a dedicated cloud project and block network traffic between them.
Related guides
In this post