The Simplest Way to Make Dataproc and GitLab CI Work Like They Should
Running dataproc and gitlab ci together lets teams automate big data jobs from code pushes. GitLab runners test your code and trigger managed Spark or Hadoop clusters in Google Cloud. This workflow turns manual data tasks into repeatable pipelines. Data engineers push code, and the runner submits the job to a cluster. When the job ends, the cluster shuts down to save money. Getting these two tools to talk safely takes careful planning. How dataproc and gitlab ci share identity and data The w
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.
Running dataproc and gitlab ci together lets teams automate big data jobs from code pushes. GitLab runners test your code and trigger managed Spark or Hadoop clusters in Google Cloud.
This workflow turns manual data tasks into repeatable pipelines. Data engineers push code, and the runner submits the job to a cluster. When the job ends, the cluster shuts down to save money. Getting these two tools to talk safely takes careful planning.
How dataproc and gitlab ci share identity and data
The workflow starts when a developer merges code into a branch. The GitLab runner wakes up and reads the pipeline steps. First, the runner must prove its identity to Google Cloud. Many teams now use OpenID Connect instead of static key files.
The runner sends a signed web token to the Google identity service. Google checks this token against a trust rule you set up. If the token passes, Google hands back a temporary cloud token. The runner uses this token to call the cluster API.
Next, the runner uploads the job files to a cloud storage bucket. The runner tells the cluster service to start a new job. The cluster pulls the job scripts from the bucket and runs them. During the run, the cluster uses its own cloud service account to read data.
Common failure modes and how to scope roles
Teams often take shortcuts when they first link these two platforms. The worst mistake is putting a long-lived JSON key in pipeline variables. Anyone with project admin rights can copy that key and use it outside.
Another trap is sharing one broad service account across all pipelines. If a test branch shares a role with production, a bad script can wipe real tables. Unlogged manual runs also hurt security when engineers fix broken jobs by hand. Without clear logs, you cannot tell who ran a query on sensitive customer records.
GitLab CI Security + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix this by splitting roles into two parts. Give the runner role permission only to submit jobs and write scripts to one bucket. Give the cluster worker role permission only to read the specific data tables it needs. Never grant project owner or editor roles to a pipeline runner.
Network paths between the runner and the cloud also need strict rules. Public runners send traffic over the open internet to the cloud API. For sensitive workloads, host your own runners inside your private cloud network. Keep the cluster nodes on private IP addresses so they stay hidden from the public web.
Managing manual checks and live data rules
Even with great pipelines, engineers still need to inspect failed jobs and query data. When a Spark job fails, a developer often connects to the cluster to check logs. If they use shared admin keys, your audit trail goes dark.
Teams should tie every human check and pipeline task to a real user identity. You also need rules to protect private data during these checks. For example, data masking can rewrite emails, phone numbers, card numbers, and national IDs in results. This keeps raw personal data out of debug logs and test outputs.
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 GitLab runners log in to Google Cloud?
Use Workload Identity Federation with OpenID Connect tokens. This lets the runner trade its pipeline job token for a temporary cloud token without storing static keys.
Should pipelines use ephemeral clusters or long-running clusters?
Most automated pipelines work best with ephemeral clusters created for one job run. You get a clean state every time and stop paying for compute as soon as the job finishes.
How do we stop test pipelines from changing production data?
Map each branch to a separate cloud service account in your trust rules. Give the test branch role read-only rights on sample data and block it from production buckets.
Related guides
In this post