Files
2nd/10_Wiki/Topics/Programming & Language/TeamCity.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

159 lines
4.3 KiB
Markdown

---
id: wiki-2026-0508-teamcity
title: TeamCity
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [JetBrains TeamCity, TC]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [ci-cd, jetbrains, build, devops]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: Kotlin DSL
framework: TeamCity 2025.x
---
# TeamCity
## 매 한 줄
> **"매 enterprise CI server with first-class build chains + Kotlin DSL config"**. JetBrains TeamCity 는 build configuration 의 strong dependency graph + snapshot/artifact dep + 매 versioned settings (Kotlin DSL) 를 제공하는 self-hosted CI. 2026 의 TeamCity 2025.x 는 cloud agents + GitHub Actions 호환성 + native AI test analytics.
## 매 핵심
### 매 핵심 개념
- **Project / Build Configuration / Build**: 3-tier hierarchy.
- **Snapshot dependency**: 매 동일 VCS revision 보장된 build chain.
- **Artifact dependency**: 매 upstream artifact pull.
- **Build chain**: composite build (status rollup).
- **Versioned settings**: 매 Kotlin DSL `.teamcity/settings.kts` git 관리.
### 매 vs Jenkins / GitHub Actions
- 매 Jenkins: plugin sprawl, 매 declarative 선택적.
- 매 GitHub Actions: SaaS-first, 매 enterprise 의 self-host 약함.
- 매 TeamCity: 매 enterprise self-host + Kotlin DSL + 매 strong test history.
### 매 응용
1. JVM monorepo (Gradle/Maven) build chain.
2. .NET / Kotlin Multiplatform CI.
3. Hybrid cloud agents (AWS/GCP/K8s) + on-prem.
## 💻 패턴
### Kotlin DSL 의 build config
```kotlin
import jetbrains.buildServer.configs.kotlin.*
import jetbrains.buildServer.configs.kotlin.buildSteps.gradle
object Build : BuildType({
name = "Build & Test"
vcs { root(DslContext.settingsRoot) }
steps {
gradle {
tasks = "clean build"
useGradleWrapper = true
}
}
triggers { vcs {} }
features {
perfmon {}
}
})
```
### Build chain (snapshot dep)
```kotlin
object Deploy : BuildType({
name = "Deploy"
dependencies {
snapshot(Build) { onDependencyFailure = FailureAction.FAIL_TO_START }
artifacts(Build) { artifactRules = "build/libs/*.jar => libs" }
}
})
```
### Parameter + secret
```kotlin
params {
param("env.NODE_ENV", "production")
password("env.NPM_TOKEN", "credentialsJSON:...")
}
```
### Agent requirements
```kotlin
requirements {
contains("teamcity.agent.jvm.os.name", "Linux")
exists("env.DOCKER_HOST")
}
```
### Matrix-style (composite build)
```kotlin
object Matrix : BuildType({ name = "All Platforms"; type = Type.COMPOSITE
dependencies {
snapshot(BuildLinux) {}
snapshot(BuildMac) {}
snapshot(BuildWin) {}
}
})
```
### REST API trigger
```bash
curl -u user:token -X POST \
-H "Content-Type: application/xml" \
-d '<build><buildType id="Build"/></build>' \
https://tc.example.com/app/rest/buildQueue
```
### Cloud agent profile (Kubernetes)
```kotlin
features {
feature {
type = "CloudImage"
param("cloud-code", "kubernetes")
param("image-name", "myorg/tc-agent:2025")
}
}
```
## 매 결정 기준
| 상황 | CI choice |
|---|---|
| 매 JVM enterprise self-host | TeamCity |
| 매 GitHub-centric OSS | GitHub Actions |
| 매 plugin-heavy legacy | Jenkins |
| 매 GitLab-native | GitLab CI |
| 매 monorepo with cache focus | Buildkite / Bazel CI |
**기본값**: 매 enterprise JVM/.NET 의 TeamCity, 매 OSS GitHub repo 의 Actions.
## 🔗 Graph
- 부모: [[CI_CD_Pipeline|CI_CD]]
- 변형: [[GitHub_Actions]]
## 🤖 LLM 활용
**언제**: 매 enterprise CI 설계, 매 build chain 의존성 모델링, 매 Kotlin DSL 마이그레이션.
**언제 X**: 매 single-repo OSS — 매 GitHub Actions 가 zero-ops.
## ❌ 안티패턴
- **UI-only config (no DSL)**: 매 settings drift, 매 review 불가능.
- **Snapshot dep 없이 chain**: 매 inconsistent revision.
- **Agent 의 secret 평문 저장**: 매 Token credentials 사용 필수.
- **Build history retention 무한**: 매 server 디스크 폭발.
## 🧪 검증 / 중복
- Verified (JetBrains TeamCity 2025 docs, Kotlin DSL guide).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — TeamCity 2025 + Kotlin DSL |