Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Continues Integration

Johan Aludden
Twitter: johanaludden
Mail: me@johanaludden.com
Blog: johanaludden.com/weblog
What is Continues Integration?
• Compile continuously
• Test continuously
• Prepare installation continuously
• Measure quality continuously
• Create documentation continuously

2
Components
• Developers
• Version Control Repository
• CI server
• Build script
• Feedback
• Integration Build Machine

3
Developers
• Makes Changes to code
• Runs a private Build
• Commits changes

4
Version Control Repository
• Central point of truth
• Good Practice
• History
• CVS, SVN, Perforce, Git

5
CI server
• Checks for changes
• Retrieves changes
• Runs build script(s)
• Dashboard

6
Build Script
• Automated
• Complete
• Launched from Command line

7
Feedback
• Email
• Instant messaging
• SMS
• RSS
• Sounds
• Monitor

8
Integration Build Machine
• Dedicated
• The reference

9
Benefits
• Risk reduction
• Less repetition
• Generate Deployable Software
• Increase Visibility
• More Confidence

10
Excuses
• Increasing maintenance
• Too much change
• Frequently failed builds
• Additional cost
• Should already be made

11
First steps
• Centralized repository
• Compile code
• Package binaries
• Add testing
• Add inspections

12
Common Problems
• Long build time
• Frequently failed builds
• To much information
• Many target platforms

13
Long build time
• Make it faster
• Split and run in Parallell
• Split and run in Sequence

14
Frequently failed builds
• Are all committed?
• Can the devs run on local machine?
• Code to fragile?
• Tests to fragile?

15
To much information
• Is all information necessary
• What information can be removed
• Multiple source of information
• Pull not push
• Visualize information

16
Many target platforms
• One CI server per platform
• Compile code
• Package binaries

17
Pipelines
• Jobs
– Runs in Parallell
• Stages
– Runs in sequence
– contains 1 or more jobs

18
Pipeline

19
Pipeline

Stage

19
Pipeline

Stage
Job

Job

19
Pipeline

Stage Stage
Job Job

Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

19
Pipeline

Stage Stage Stage


Job Job Job
Job Job

20
Pipeline

Stage Stage Stage


Job Job Job
Job Job

20
Pipeline

Stage Stage Stage


Job Job Job
Job Job

20
Pipeline

Stage Stage Stage


Job Job Job
Job Job

20
Pipeline

Stage Stage Stage


Job Job Job
Job Job

20
Pipeline

Stage Stage Stage


Job Job Job
Job Job

20
Pipeline

Stage Stage Stage


Job Job Job
Job Job

20
Pipeline

Stage Stage Stage


Job Job Job
Job Job

20
Pipeline

Stage Stage Stage


Job Job Job
Job Job

20
CI servers
• CruiseControl
• Hudson
• Cruise
• Bamboo

21
Links
• Martin Fowler (http://martinfowler.com/articles/continuousIntegration.html)
• Book (http://www.amazon.com/Continuous-Integration-Improving-Software-
Reducing/dp/0321336380)

• CruiseControl (http://cruisecontrol.sourceforge.net/)
• Hudson (https://hudson.dev.java.net/)
• WikiPedia (http://en.wikipedia.org/wiki/Continuous_integration/)

22
Questions?

23

You might also like