The Simplest Way to Make Cohesity and Teamcity Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Pairing Cohesity and TeamCity lets build pipelines trigger data snapshots and clone test databases. Teams link both tools to protect build outputs and test code against real data. TeamCity runs your builds, tests, and release steps on a set schedule. Cohesity manages data backups, storage volumes, and database clones across your systems. Linking the two gives engineers fresh data copies for every major test run. It also ensures that every critical release saves a clean backup first. How Cohes

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.

Pairing Cohesity and TeamCity lets build pipelines trigger data snapshots and clone test databases. Teams link both tools to protect build outputs and test code against real data.

TeamCity runs your builds, tests, and release steps on a set schedule. Cohesity manages data backups, storage volumes, and database clones across your systems. Linking the two gives engineers fresh data copies for every major test run. It also ensures that every critical release saves a clean backup first.

How Cohesity and TeamCity share auth and data

TeamCity agents need a clear path to call the Cohesity cluster API. A build step sends an API request over the network to Cohesity. That request asks Cohesity to take a snapshot or mount a data clone. Cohesity checks the identity of the caller before it runs any storage task.

To log in, the build agent presents an API key or user credential. Cohesity maps that credential to an internal role with specific storage rights. Once approved, Cohesity spins up a thin clone of the target database volume. It then shares the new volume path back to the TeamCity build agent.

The build agent runs tests against that fresh data clone right away. When the test suite ends, TeamCity sends one more call to Cohesity. That final call tells the storage cluster to tear down the temporary clone. This flow keeps storage use low while giving developers accurate test runs.

Common failure modes and how to scope roles

Many teams take shortcuts when they first wire up these two systems. A common mistake is sharing one admin account across all TeamCity build agents. If a single build script leaks that key, all backup data is at risk. Attackers or bad scripts could delete snapshots or read private production volumes.

Broad tokens create another big risk for your build and storage setup. Long-lived keys sitting in TeamCity project settings often go months without rotation. Engineers also struggle with unlogged queries and mystery API calls from shared runners. When five projects use one identity, Cohesity logs cannot show which build broke.

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 scoping roles down to the exact task. Create a dedicated Cohesity role that can only clone specific non-production data sources. Never give a build agent the right to delete production backup snapshots. Assign unique accounts to separate TeamCity projects so your audit logs stay clear.

Network paths between build runners and storage nodes also need tight rules. Place your TeamCity agents on a subnet that only reaches required API ports. Block build containers from talking to storage management ports they do not need. Rotate the keys stored in your build server on a tight schedule.

Keeping test data safe during build runs

Mounting backup clones into a build pipeline brings real data privacy risks. Production backups often hold sensitive customer details inside tables and log files. If a build script dumps a failed test row, private data hits the logs.

Teams should scrub or mask sensitive fields before tests touch the cloned volume. Data masking rewrites matched fields like emails, phone numbers, card numbers, or national IDs. This keeps test shapes valid while protecting real user details in build logs. Combine scoped storage roles with clean test data to keep every pipeline safe.

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

Linking them lets pipelines take safe snapshots right before a major release runs. It also lets test jobs spin up fast database clones for integration checks.

What permissions should a TeamCity agent have in Cohesity?

Give the agent role only the rights to clone and unmount test volumes. Never grant full cluster admin rights or permission to delete production backups.

How do we stop sensitive backup data from leaking into build logs?

Apply data masking to rewrite emails, phone numbers, and card numbers in test clones. Also restrict which engineers can read full build logs on the server.

The query runs. The emails stay hidden.