TeamCity
JetBrains continuous integration server providing build, test, and deployment automation with an intuitive interface and configurable pipelines.
Updated on January 20, 2026
TeamCity is a continuous integration and continuous deployment platform developed by JetBrains. Renowned for its elegant user interface and flexible configuration, TeamCity enables development teams to automate their build, test, and deployment processes while providing complete visibility into project status. The solution natively supports a wide range of technologies and integrates seamlessly with JetBrains development tools.
Fundamentals
- Server-agent architecture enabling build distribution across multiple machines
- Configuration via graphical interface or Kotlin DSL files for Configuration as Code approach
- Build chains system to orchestrate complex pipelines with dependencies
- Native support for Docker, Kubernetes, and major programming languages
- Fine-grained permission management with LDAP/Active Directory integration
Benefits
- Intuitive user interface reducing the learning curve for new users
- Automatic detection of failed tests with history and trend analysis
- Build parallelization and intelligent task distribution for performance optimization
- Native integration with IntelliJ IDEA, ReSharper, and other JetBrains tools
- Advanced artifact management with automatic cleanup and build dependencies
- Generous free version (100 build configurations, 3 agents) for small teams
Practical Example
Here's an example of TeamCity configuration in Kotlin DSL for a Node.js project with automated deployment:
import jetbrains.buildServer.configs.kotlin.*
import jetbrains.buildServer.configs.kotlin.buildSteps.nodeJS
import jetbrains.buildServer.configs.kotlin.buildSteps.script
import jetbrains.buildServer.configs.kotlin.triggers.vcs
object BuildProject : BuildType({
name = "Build and Deploy API"
vcs {
root(DslContext.settingsRoot)
}
steps {
nodeJS {
name = "Install Dependencies"
shellScript = """
npm ci
""".trimIndent()
}
nodeJS {
name = "Run Tests"
shellScript = """
npm run test:coverage
npm run lint
""".trimIndent()
}
script {
name = "Build Docker Image"
scriptContent = """
docker build -t myapp:\${teamcity.build.id} .
docker tag myapp:\${teamcity.build.id} myapp:latest
""".trimIndent()
}
script {
name = "Deploy to Staging"
conditions {
equals("teamcity.build.branch", "develop")
}
scriptContent = """
kubectl set image deployment/myapp \
myapp=myapp:\${teamcity.build.id} \
-n staging
""".trimIndent()
}
}
triggers {
vcs {
branchFilter = "+:*"
enableQueueOptimization = false
}
}
features {
dockerSupport {
cleanupPushedImages = true
}
}
})Implementation
- Install TeamCity server (Docker, native installation, or cloud) and configure the database
- Deploy build agents on dedicated machines or containers based on parallelization needs
- Create a project and define VCS connection (Git, SVN, Mercurial, Perforce)
- Configure build steps via interface or export to Kotlin DSL for versioning
- Define triggers (VCS, schedule, dependencies) and execution conditions
- Configure agent requirements to direct builds to appropriate agents
- Set up notifications (email, Slack, webhooks) and integrations
- Enable features like versioning, composite builds, and automatic failure investigation
Pro tip
Use TeamCity Meta-Runners to create reusable steps across your projects. Combined with Kotlin DSL and versioning configurations in Git, you get a maintainable and auditable Infrastructure as Code approach while retaining the simplicity of the graphical interface for quick adjustments.
Related Tools
- JetBrains Space for complete collaboration (VCS, CI/CD, project management)
- YouTrack for native issue integration and change tracking
- Artifactory or Nexus for centralized artifact management
- SonarQube for code quality analysis integrated into pipelines
- Octopus Deploy for advanced deployment scenarios
- Prometheus and Grafana for build performance monitoring
TeamCity stands out for its unique balance between power and ease of use, making it a preferred choice for organizations seeking to industrialize their software delivery without sacrificing developer productivity. Its ability to handle complex pipelines while remaining accessible to teams of all sizes makes it a mature and proven CI/CD solution, particularly suited for polyglot environments requiring flexibility and granular control.
