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

Published
Length
3 min read

Luis Felipe Dias

All posts

Using teamcity and temporal together lets build jobs trigger durable background tasks. Build agents compile code, run tests, and start long workflows in your cluster. This setup keeps CI pipelines fast while durable workers handle slow deploys. Your build runners do not wait around for hours during multi-region rollouts. Instead, the build server hands off the state to the workflow engine. The workflow engine tracks retries, timeouts, and rollbacks on its own. How teamcity and temporal share

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.

Using teamcity and temporal together lets build jobs trigger durable background tasks. Build agents compile code, run tests, and start long workflows in your cluster.

This setup keeps CI pipelines fast while durable workers handle slow deploys. Your build runners do not wait around for hours during multi-region rollouts. Instead, the build server hands off the state to the workflow engine. The workflow engine tracks retries, timeouts, and rollbacks on its own.

How teamcity and temporal share identity and data

First, the build agent needs a way to log in to the cluster. Teams use client certs or API keys for this step. The build server stores these secrets in a project store. When a job runs, the agent reads the secret into memory.

Next, the agent sends a start request to the target namespace. This request carries a payload with build numbers and commit hashes. It can also carry links to build artifacts. You should keep this payload small and clean. Never pass raw passwords or private keys inside workflow inputs. The workflow engine writes all inputs to its history log. Anyone who can read the namespace can read that history log.

Worker nodes then poll the task queue and pick up the job. These workers run inside your cloud network and do the heavy work. Meanwhile, the build agent can either exit or poll for a final status. Exiting early frees up the build agent for the next developer commit.

Common failure modes and how to scope roles

Many teams make the mistake of sharing one admin key across all projects. If a test job leaks that key, an attacker can reach production namespaces. Another common bug is leaving network ports open to every build agent. A rogue script in a pull request could cancel active production runs.

You can fix this by giving each build project its own identity. Map each identity to a single namespace and a single task queue. A staging build agent should only talk to the staging namespace. Give the build role permission to start and query workflows only. It does not need permission to delete namespaces or change retention rules.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You also need clear audit logs across both systems. When a workflow starts, tag it with the build ID and user name. This tag links the durable run back to the person who pushed code. Also, mask sensitive fields like emails or phone numbers in workflow payloads. Masking rewrites matched fields in results so private data stays safe.

Managing network paths and worker data

Network rules play a big part in keeping both tools safe. Place your build agents in a separate network zone from production workers. Allow traffic from agents to the cluster frontend port only. Block agents from talking directly to the database that backs the cluster.

Keep your worker logs clean as well. Workers often return status data back to the build server. Check that error messages do not dump raw card numbers or national IDs. Scoping roles, network paths, and payloads keeps your whole pipeline safe.

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

Should build agents wait for workflows to finish?

For short tasks, the build agent can poll until the run ends. For long tasks, let the agent exit and send a webhook later.

How should we store cluster keys in the build server?

Store keys as masked project secrets scoped to specific build plans. Rotate these keys on a set schedule and limit them to one namespace.

What data should we pass from the build job to the workflow?

Pass only the build ID, commit hash, and artifact storage path. Never send raw secrets, emails, or card numbers in the input payload.

The query runs. The emails stay hidden.