Upload
nikita-skvortsov
View
361
Download
1
Embed Size (px)
DESCRIPTION
Modern continuous integration tools have grown over years, and turned into smart and complex software. They support a wide range of technologies, and offer lots of options for configuration and customization. This often means that there are several ways to configure your continuous integration server to achieve the same goal. Some of these approaches are worse than others, as such configurations are harder to maintain. Besides, they do not allow using additional features and getting extra benefits that the CI server could provide. We know this from our experience in developing JetBrains TeamCity and supporting our customers. Over time we have seen lots of deployments and real environments, and accumulated broad knowledge on good and bad practices of CI software configuration. This talk will be useful for anyone dealing with Continuous Integration. We will review most common configuration problems and mistakes, discuss different solutions for them and demonstrate some of the advanced TeamCity features that enable you to manage build infrastructure more efficiently.
Citation preview
Best Practices for Continuous Integration Setup
Михаил КузьминНикита СкворцовJetBrains
Проблемы
1. Билды зависят от окружения
2. Артефакты в VCS
3. Релизится не то, что было протестировано
4. Рассинхронизация билдов в очереди
5. Билды с параметрами
6. Красные билды
cd D:\Project
Абсолютные пути
Script 1Script 2Script 3
Несколько шагов в билде
#1 Делайте билды переносимыми
Зависимости
VCSCI
Sources
Artifacts
Зависимости
VCS
Artifact Repository
CISources
Artifacts
Артефакты билда в VCS
CIVCS
Artifact
Артефакты билда в VCS
CIVCS
Artifact
#2 Пользуйтесь репозиториями артефактов
Demo: NuGet
Тесты на разных платформах
Тесты на разных платформах
Тесты на разных платформах
#3 Переиспользуйте артефакты между билдами
Demo: Artifact Dependencies
Commit 1
Compile Test
Очередь билдов
Compile Test
Очередь билдов
Ожидание
Commit 1
Compile
Commit 2 Commit 3
Очередь билдовCommit 1
Test
Ожидание
Compile
Revision 1 Revision 3
Очередь билдовCommit 1 Commit 2 Commit 3
Test
#4 Синхронизируйте цепочку билдов
Compile
Очередь билдовCommit 1 Commit 2 Commit 3
Test
Revision 1 Revision 3
Compile
Очередь билдовCommit 1 Commit 2 Commit 3
Test
Revision 1 Revision 1
Demo: Snapshot Dependencies
Staging Production
Бидл с параметрами
Статус проекта
История билдов
#5 Билды должны повторять одинаковую процедуру
Demo: Configuration Templates
Красные билды
#6 Исправляйте красные билды
Demo: Feature Branches
Решения
1. Делайте билды переносимыми
2. Пользуйтесь репозиториями артефактов
3. Переиспользуйте артефакты между билдами
4. Синхронизируйте цепочку билдов
5. Билды должны повторять одинаковую процедуру
6. Исправляйте красные билды
Спасибо за внимание!
Никита Скворцов[email protected]
Михаил Кузьмин[email protected]
http://www.jetbrains.com/teamcity/