Your cheat-sheet companion for the entire series: top gotchas, all runners, predefined parameters, branch-spec patterns, REST API endpoints, Jenkins comparison, and naming conventions
The agent registers itself but must be authorized manually in Administration → Agents → Unauthorized. Until authorized it will never pick up builds.
Artifact paths always use forward slashes / even on Windows agents. Backslashes silently produce no artifacts.
+: prefix
Every branch pattern must start with +: (include) or -: (exclude). A bare refs/heads/* with no prefix is invalid and monitors nothing.
+:refs/heads/* does NOT include the default branch unless the default branch is under refs/heads/. Add +:refs/heads/main explicitly or verify.
Cross-build parameters use dep.<ExternalID>.param. The external ID is case-sensitive and includes the project prefix. A single wrong character means the parameter stays blank with no error.
The bundled HSQL database is development-only. It does not support concurrent writes and corrupts under moderate load. Always migrate to MySQL or PostgreSQL before going live.
Only parameters whose type is explicitly set to Password are masked in logs. A system property or env var named env.SECRET will still print in full unless its type is Password.
If no agent satisfies a build's requirements the build sits in the queue forever with a "No compatible agents" note in small text. Always check agent compatibility before wondering why a build won't start.
Artifact dependency set to "latest successful build" will pick an artifact from a different chain run. Use "build from the same build chain" to guarantee you're testing the exact artifact you just built.
Without a quiet period, every single commit in a multi-commit push fires a separate build. Set a 60–120 second quiet period to batch commits from the same push into one build.
When you copy a build configuration the build counter continues from where the source left off. Reset it to 1 in General Settings if you want the new config to start from build #1.
Enabling "Clean all files before build" means full VCS checkout every time — safe but slow. Use it only for release builds; leave it off for developer feedback builds.
A composite build configuration is purely an aggregation node — it can have snapshot dependencies and parameters but no build steps. Adding steps to a composite config has no effect.
Detaching a build configuration from its template embeds the current state, but any parameters or steps that were identical to the template are not highlighted. Review all settings after detaching.
Enabling Versioned Settings with Kotlin DSL does not immediately export existing config. You must commit the generated XML first, then migrate to Kotlin — skipping the XML step causes a blank config import.
Accept header return XML
TeamCity defaults to XML responses. Add Accept: application/json to every API request or you'll parse XML instead of JSON. The Content-Type: application/json header is also required for POST bodies.
The default 750 MB heap is insufficient for large installations. On a server with 50+ projects and 500+ builds/day, increase -Xmx to at least 2–4 GB in TEAMCITY_SERVER_MEM_OPTS.
The SSH Agent build feature forwards the key to the agent JVM process but not to child processes spawned via shell scripts unless you explicitly eval the agent socket in the script.
In some 2017.x versions, cancelling a build while it holds a Shared Resource lock can leave the lock held until the next build finishes. Monitor the Shared Resources page if builds queue unexpectedly.
Notification rules apply to regular builds. Personal (pre-commit) builds only notify the build's owner unless you explicitly check "My personal builds" in the notification rule.
| Runner | Language / Platform | Key Settings |
|---|---|---|
| Maven | Java | Goals, POM path, JVM options, user settings XML |
| Gradle | Java / Kotlin | Tasks, Gradle wrapper, build file, init scripts |
| Ant | Java | Build file, targets, JVM options |
| IntelliJ IDEA Project | Java / Kotlin | Project path, build configuration (for inspections) |
| MSBuild | .NET / C# | Build file, targets, MSBuild version, platform |
| .NET CLI | .NET Core | Command (build/test/publish), project, args |
| Visual Studio (sln) | .NET Framework | Solution file, VS version, configuration/platform |
| Command Line | Any | Executable or script content, working directory |
| PowerShell | Windows | Edition (Desktop/Core), version, script file or content |
| Python | Python | Python executable, script, environment |
| Rake | Ruby | Ruby interpreter, Rakefile, tasks |
| FTP Upload | Deployment | FTP host, credentials, source/target paths |
| SSH Exec | Deployment | Host, credentials, commands to run remotely |
| SSH Upload | Deployment | Host, credentials, source/target paths (SCP) |
| Duplicates Finder (Java) | Java analysis | Source directories, threshold, exclusions |
| Duplicates Finder (.NET) | .NET analysis | Source pattern, threshold |
| Inspections (IntelliJ) | Java/Kotlin analysis | Profile XML, failure conditions |
| NUnit | .NET testing | NUnit version, assemblies, run type |
| MSTest | .NET testing | Test file, test names, VS version |
| NAnt | .NET build | Build file, targets, NAnt home |
| Docker | Containers | Subcommand (build/push/other), image name, Dockerfile |
| Parameter | Example Value | Description |
|---|---|---|
| build.number | 42 | Current build number (auto-incremented counter by default) |
| teamcity.build.id | 12345 | Unique internal build ID (never reused) |
| teamcity.buildType.id | MyProject_Build | External ID of the build configuration |
| teamcity.projectName | MyProject | Name of the containing project |
| teamcity.buildConfName | Build | Name of this build configuration |
| Parameter | Example Value | Description |
|---|---|---|
| build.vcs.number | a3f8d12 | VCS revision (commit SHA / SVN rev) |
| teamcity.build.branch | refs/heads/main | Full branch ref being built |
| teamcity.build.branch.is_default | true | true when building the default branch |
| teamcity.pullRequest.number | 47 | PR number (set by Pull Request build feature) |
| teamcity.pullRequest.title | Fix login bug | PR title (set by Pull Request build feature) |
| Parameter | Example Value | Description |
|---|---|---|
| agent.name | linux-agent-1 | Name of the agent running this build |
| agent.home.dir | /opt/teamcity-agent | Agent installation directory |
| agent.work.dir | /opt/tc-agent/work | Agent working directory root |
| agent.tools.dir | /opt/tc-agent/tools | Agent tools directory (JDKs, etc.) |
| system.agent.home.dir | /opt/tc-agent | Same as agent.home.dir as a system property |
| Parameter | Example Value | Description |
|---|---|---|
| build.start.date | 20260612T093045+0530 | Build start timestamp (ISO 8601) |
| teamcity.serverUrl | http://tc.company.com:8111 | TeamCity server URL (useful for notification scripts) |
Each line is +: (include) or -: (exclude) followed by a pattern. The logical branch display name is in (*).
refs/heads/; display name = branch name (e.g. main)main branchrelease/x.y branches(*) — strips refs/heads/ prefix47/headfeature- prefix (glob-style, no capture)Base URL: http://<server>:8111/app/rest — Add -H "Accept: application/json" to every curl call.
{"name":"…","parentProject":{"id":"_Root"}})main for a specific configtrue, content-type: text/plain)| Feature | TeamCity 2017.2.2 | Jenkins (LTS) | Edge |
|---|---|---|---|
| Setup / UI | Wizard-driven, polished web UI, no plugin hunting for basics | Bare after install; plugins required for almost everything | TC |
| Build configuration | GUI form-based; Kotlin DSL optional | Jenkinsfile (Groovy DSL) — code-first | Tie (depends on preference) |
| Build chains / pipelines | First-class: snapshot + artifact dependencies, chain visualization | Pipeline plugin; multi-stage but no built-in chain visualization | TC |
| Agent management | Built-in pools, requirements matching, auto-upgrade | Nodes/labels; agent management via plugins | TC |
| Test reporting | Built-in: pass/fail trend, flaky test detection, history | JUnit plugin; decent but no flaky test detection built-in | TC |
| Plugin ecosystem | ~100 official plugins; smaller community | 1,800+ plugins; huge community | Jenkins |
| Infrastructure as code | Kotlin DSL (strong typing, IDE support) | Jenkinsfile (Groovy; widely adopted, more examples) | Jenkins (ecosystem) |
| Cost | Free up to 3 agents + 100 build configurations; paid tiers beyond | Open source, free always | Jenkins |
| Security (built-in) | Role-based, 2FA (2017.2), project-level isolation, audit log | Role Strategy plugin needed; security is add-on | TC |
| REST API | Comprehensive, well-documented, stable versioning | Available but less consistent; JSON by default | Tie |
| Hosted / cloud option | TeamCity Cloud (JetBrains hosted) | CloudBees CI (paid); no official JetBrains equivalent | Tie |
OrderService, FrontendAppOrderService / Production, OrderService / StagingBuild, Test Unit, Test Integration, Package, Deploy Staging, Deploy ProductionStaging / DeployTPL_ — e.g. TPL_MavenBuild, TPL_NodeTest<Org>/<Repo> (branch) — e.g. myorg/order-service (main)<Org>/<Repo>env.prefix.name — e.g. deploy.s3.bucketsystem.maven.optsenv.JAVA_HOME, env.DOCKER_REGISTRY.secret or .password as a visual cueLinux-Java11, Windows-DotNet6, Docker-PrivilegedProduction-Deploytarget/*.jar => artifactsorder-service/target/*.jar => artifacts/order-service**/surefire-reports/*.xml => test-reports