3. What is CI?
Continuous Integration = CI
"The aim of Continuous Integration is that the
software is in a working state all the time" [1]
What type of “software” are we talking about?
CI helps avoid “integration hell”
“Bring the pain forward”
[1] Continuous Delivery (book), Jez Humble & David Farley
Wednesday, 19 June 13
4. What is CI? [cont.]
With CI: Your software is proven to work with
every change (assuming sufficiently
comprehensive automated test suite)
Without CI: Your software is broken until
someone proves it works, usually during a
testing or (typically late) integration stage
Wednesday, 19 June 13
5. Benefits of CI
Reduced integration time and cost
Reduced delivery risks
Improved and shorter feedback cycles
Improved team communication
Improved software quality
Wednesday, 19 June 13
6. Benefits of CI [cont.]
Having a comprehensive automated test suite
supports TDD (fast feedback) and refactoring
Early warning system for issues
Visibility of the health and production
readiness of the software outside of the team
Wednesday, 19 June 13
8. How to start doing CI
Pre-requisites: Version Control, Automated
Build, Agreement of the team, CI Server
(optional but highly recommended)
Start simple - automate build, add some
automated tests, incremental improvements
Make sure everyone understands the CI
process, scripts and how to run them
Wednesday, 19 June 13
9. How to start doing CI
Put everything required to build and test your
software in source control
Start building a CI server to run your build,
tests, package, etc, on every commit
Advanced CI: Build and Test Everything: Code
+ Configuration + Infrastructure changes
Typical day-to-day Developer CI scenario...
Wednesday, 19 June 13
19. CI Stages
Images from “Continuous Delivery” (book) by Jez Humble &
David Farley
Wednesday, 19 June 13
20. CI Stages
Commit stage
Compile
Unit test
Assemble
Code analysis
source code
commit tests
build scripts
deployable binaries
test reports
metadata
Version
control
Artifact
repository
Acceptance test stage
Configure environment
Deploy and smoke test
Acceptance test
Tear down
acceptance tests
deployment scripts
configuration data test reports
metadata
Version
control
Artifact
repository
binaries
Artifact
repository
Images from “Continuous Delivery” (book) by Jez Humble &
David Farley
Wednesday, 19 June 13
21. Manual Stages
Image from “Continuous Delivery” (book) by Jez Humble &
David Farley
Wednesday, 19 June 13
22. Manual Stages
Later stages
Configure environment
Deploy and smoke test
Tear down on request
deployment scripts
configuration data
test reports
metadata
Version
control
Artifact
repository
binaries
Artifact
repository
Image from “Continuous Delivery” (book) by Jez Humble &
David Farley
Wednesday, 19 June 13
23. But what about...
Scheduled builds vs. build on every commit?
Branching vs Mainline: Good or Evil?
Changes that are not ready for use?
Off-the-shelf packages?
Distributed teams?
Large projects?
Wednesday, 19 June 13
31. Tips for Success
Checkin regularly - Everyone commits to the
mainline every day
Create a comprehensive automated test suite
Keep the commit stage fast
Make the build visible (dashboards, build
lights)
Automate the build (run it on a CI server)
Wednesday, 19 June 13
32. Tips for Success
[cont.]
Agree on build hygiene and responsibilities
Don't checkin on a broken build
Take responsibility for all breakages that result
from your changes
Every commit to mainline should be
automatically tested
Don't comment out failing tests
Wednesday, 19 June 13
34. Next Steps
Books
Continuous Delivery, Jez Humble & David Farley
Continuous Integration, Paul M. Duvall
Internet Resources
"Continuous Integration is an Attitude, Not a Tool" (http://
www.jamesshore.com/Blog/Continuous-Integration-is-an-
Attitude.html)
Wednesday, 19 June 13
36. Credits
Slides 10, 14, 15, 16 - Tom Sulston
(@tomsulston), ThoughtWorks, from his
presentation
Slides 11, 12 - Images are from the
“Continuous Delivery” book by Jez Humble &
David Farely
Other photo credits are indicated on the slides
where they are used
Wednesday, 19 June 13