XP Days Ukraine 2016—
November 11, 2016Kiev
From Continuous Integration to Continuous Deliverywith TeamCity—
Sergey PakTeamCity DeveloperJetbrains
About myself—
• Delivering code since 2003
• Improving TeamCity since 2013
• Primary focus - cloud integration
From CI to CD with TC About myself
@JetBrains. All rights reserved
What is Continuous Integration—
• Integrate into shared mainline
From CI to CD with TC What is CI
@JetBrains. All rights reserved
What is Continuous Integration—
• Integrate into shared mainline
• Automated self-testing build
• Test every commit
• Everyone can see the results
From CI to CD with TC What is CI
@JetBrains. All rights reserved
From CI to CD with TC Before TeamCity
@JetBrains. All rights reserved
Before TeamCity
From CI to CD with TC Before TeamCity
@JetBrains. All rights reserved
CruiseControl—
The main and the only CI tool in 2006
From CI to CD with TC Before TeamCity
@JetBrains. All rights reserved
CruiseControl—
Edit configuration
From CI to CD with TC Before TeamCity
@JetBrains. All rights reserved
We needed another CI tool
Problems to address initially—
• 5 PM Check-in
• Multiple platforms
• UI to edit configurations
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Remote Run—
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Remote Run +Pretested Commit—
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Remote Run UI—
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Remote Run UI—
Problems to address initially—
• 5 PM Check-in - Remote Run + Pretested commit
• Multiple platforms
• UI to edit configurations
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Build Agent—
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Build Agent—
• Required software:
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Build Agent—
• Required software:
• Tools and plugins: from server
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Build Agent—
• Required software:
• Tools and plugins: from server
• No maintenance required:
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Build Agent—
• Required software:
• Tools and plugins: from server
• No maintenance required:• Auto-upgrade
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Build Agent—
• Required software:
• Tools and plugins: from server
• No maintenance required:• Auto-upgrade• Can work without server
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Build Agent—
• Required software:
• Tools and plugins: from server
• No maintenance required:• Auto-upgrade• Can work without server• Self-cleanup
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Build Agent—
Available out of the box:
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Problems to address initially—
• 5 PM Check-in
• Multiple platforms - Build agent
• UI to edit configurations
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
TeamCity UI—
2006
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
TeamCity UI—
2016
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Problems to address initially—
• 5 PM Check-in - Remote run + Pretested commit
• Multiple platforms - Build agent
• UI to edit configurations
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Other problems—
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Multiple repos / long checkout Get revisions first
Reuse settings Templates
No responsibility Investigations
Parallel execution Build chains (Snapshot dependencies)
Other problems—
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Multiple repos / long checkout Get revisions first
Reuse settings Templates
No responsibility Investigations
Parallel execution Build chains (Snapshot dependencies)
Other problems—
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Multiple repos / long checkout Get revisions first
Reuse settings Templates
No responsibility Investigations
Parallel execution Build chains (Snapshot dependencies)
Other problems—
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Multiple repos / long checkout Get revisions first
Reuse settings Templates
No responsibility Investigations
Parallel execution Build chains (Snapshot dependencies)
Other problems—
From CI to CD with TC TC 1.0
@JetBrains. All rights reserved
Multiple repos / long checkout Get revisions first
Reuse settings Templates
No responsibility Investigations
Parallel execution Snapshot dependencies(Build chain)
From CI to CD with TC Snapshot dependencies
@JetBrains. All rights reserved
Snapshot Dependencies
Snapshot dependencies—
• Source-level dependency
• Snapshot = set of VCS revisions
From CI to CD with TC Snapshot dependencies
@JetBrains. All rights reserved
Snapshot dependencies—
Build chains:
• Chain 1: GDCA• Chain 2: GDHEFB
From CI to CD with TC Snapshot dependencies
@JetBrains. All rights reserved
Snapshot dependencies—
Trigger one build
From CI to CD with TC Snapshot dependencies
@JetBrains. All rights reserved
Snapshot dependencies—
Optimize
From CI to CD with TC Snapshot dependencies
@JetBrains. All rights reserved
Snapshot dependencies—
Optimize
From CI to CD with TC Snapshot dependencies
@JetBrains. All rights reserved
Snapshot dependencies—
Optimize
From CI to CD with TC Snapshot dependencies
@JetBrains. All rights reserved
Snapshot dependencies—
Results in one place:
• dependencies
From CI to CD with TC Snapshot dependencies
@JetBrains. All rights reserved
Snapshot dependencies—
Results in one place:
• tests
From CI to CD with TC Snapshot dependencies
@JetBrains. All rights reserved
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
Feature branches
Feature branches—
SVN vs GitMarketshare
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
Feature branches—
• Same build configuration
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
Feature branches—
• Same build configuration
• Branch - build/test attribute
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
Feature branches—
• Same build configuration
• Branch - build/test attribute
• Different settings per branch
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
Feature branchesUI—
Overview
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
Feature branchesUI—
History
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
Feature branchesUI—
Build chains
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
Feature branchesUI—
Test history
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
DVСS Support—
• Mirrors on agents
• Sparse checkout
• Subrepo/submodule support
• Auto-merge
From CI to CD with TC Feature branches
@JetBrains. All rights reserved
From CI to CD with TC Cloud integration
@JetBrains. All rights reserved
Cloud integration
Why Cloud?—
From CI to CD with TC Cloud integration
@JetBrains. All rights reserved
Why Cloud?—
From CI to CD with TC Cloud integration
@JetBrains. All rights reserved
• Easier maintenance
Why Cloud?—
• Easier maintenance
From CI to CD with TC Cloud integration
@JetBrains. All rights reserved
Why Cloud?—
From CI to CD with TC Cloud integration
@JetBrains. All rights reserved
• Scalability
Why Cloud?—
• Easier maintenance
• Scalability• EC2 spot instances supported
From CI to CD with TC Cloud integration
@JetBrains. All rights reserved
Cloud Integration—
From CI to CD with TC Cloud integration
@JetBrains. All rights reserved
Dogfooding vs External Feedback—
From CI to CD with TC Dogfooding
@JetBrains. All rights reserved
Features from Jetbrainers—
• Feature branches
• Fix revisions before build
• Snapshot dependencies
• Remote run
From CI to CD with TC Dogfooding
@JetBrains. All rights reserved
Features from customers—
• Multiple build steps
• Project hierarchy
• Per-project permissions (+roles)
• Cloud integration
From CI to CD with TC Dogfooding
@JetBrains. All rights reserved
From CI to CD with TC Dogfooding
@JetBrains. All rights reserved
Want your feature?Let us know!
https://youtrack.jetbrains.com
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
Continuous Deploymentof
TeamCity with TeamCity
Why CD?—
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
Why CD?—
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
Why CD?—
• Less changes per update
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
Why CD?—
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
67
Why CD?—
• Less changes per update
• Early feedback
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
TeamCity CD—
TeamCity = Service + Product
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
TeamCity CD—
Numbers:
• 17,000 tests
• Test coverage 65%
• 46 configurations
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
TeamCity CD—
Instance size:
• 320 agents (220 - vmware)
• 25,000 builds per day
• 600 users
• 4000 build configurations in 700 projects
• 10TB artifacts
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
TeamCity CD—
Instance size:
• 10 CPU Cores
• -Xmx10G
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
TeamCity CD—
• Unit tests
• Integration tests
• Acceptance tests
• Code review
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
TeamCity CD—
• Unit tests
• Integration tests
• Acceptance tests
• Code review
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
= Trusted package
TeamCity CDTrusted package—
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
TeamCity CDDeployment—
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
Conclusion—
• Use TeamCity - it’s free to start
• Get in touch with us:• https://youtrack.jetbrains.com• [email protected]• [email protected]
• Happy building!
From CI to CD with TC Continuous Deployment
@JetBrains. All rights reserved
Thank you for your attention—
jetbrains.com
Top Related