Continuous Integration, Fast Builds and Flot
-
Upload
melbournepatterns -
Category
Technology
-
view
1.252 -
download
0
description
Transcript of Continuous Integration, Fast Builds and Flot
![Page 1: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/1.jpg)
Continuous Integration, Fast Builds and Flot
Chris Bushell - Melbourne Patterns Group February 3rd 2010
![Page 2: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/2.jpg)
Traditional Software Development
• Waterfall• Development happens independently, in
parallel streams• Integration phase
![Page 3: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/3.jpg)
Integration Is Painful
• Time consuming• Unpredictable
![Page 4: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/4.jpg)
Typical Software Development
![Page 5: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/5.jpg)
Continuous Integration
• Single source code repository• Automated build• Automated tests• Frequent commits
![Page 6: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/6.jpg)
CI In Practice – Check OutTi
me
![Page 7: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/7.jpg)
CI In Practice – Write CodeTi
me
![Page 8: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/8.jpg)
CI In Practice – Run BuildTi
me
![Page 9: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/9.jpg)
CI In Practice – CommitTi
me
![Page 10: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/10.jpg)
CI In PracticeTi
me
![Page 11: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/11.jpg)
CI In Practice – Continuous BuildTi
me
![Page 12: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/12.jpg)
Encourage Frequent Check-Ins
• Integrating small changes is much less painful and time consuming than integrating large changes
![Page 13: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/13.jpg)
Problem - Builds Can Become Slow
• More code = more tests = longer build time
![Page 14: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/14.jpg)
A Fast Build Is Essential
• Idle developers• Context switching• Unable to deliver new features• I get bored easily
![Page 15: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/15.jpg)
Monitoring Build Time
• Need to measure how long your build takes
![Page 16: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/16.jpg)
Continuous Integration Server
• API allows us to access historic build time information
![Page 17: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/17.jpg)
Flot
• Demo
![Page 18: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/18.jpg)
Speeding Up A Slow Build
• Split code base
![Page 19: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/19.jpg)
Speeding Up A Slow Build
• Hardware• SSD
![Page 20: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/20.jpg)
Speeding Up A Slow Build
• Think about how to test• Unit tests are fast• Functional testing can be slow
![Page 21: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/21.jpg)
Speeding Up A Slow Build
• Isolation from slow dependencies• Impersonator pattern
![Page 22: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/22.jpg)
Speeding Up A Slow Build
• Parallelize build– Be careful with shared dependencies
![Page 23: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/23.jpg)
Speeding Up A Slow Build
• Choose a light weight development container
![Page 24: Continuous Integration, Fast Builds and Flot](https://reader033.fdocuments.us/reader033/viewer/2022061202/546b222daf795919088b5229/html5/thumbnails/24.jpg)
Speeding Up A Slow Build
• Sam Newman’s Build Patterns– Check In Gate– Fish Eye Test Suite– Build Time Limit