0% found this document useful (0 votes)
39 views30 pages

Introduction To Continuous Integration: Mike Roberts

This document provides an introduction to continuous integration. It defines continuous integration as integrating code changes frequently, usually daily or more, and verifying the integrated code through automated builds and tests. The benefits of continuous integration include regular feedback, reduced integration issues, enabling concurrent development, and increased automation. It requires source code management, automated builds and tests, and developer discipline in integrating changes continuously rather than periodically. Automated continuous integration servers help make the process easy by detecting changes, running builds, and publishing results.

Uploaded by

Abhishek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views30 pages

Introduction To Continuous Integration: Mike Roberts

This document provides an introduction to continuous integration. It defines continuous integration as integrating code changes frequently, usually daily or more, and verifying the integrated code through automated builds and tests. The benefits of continuous integration include regular feedback, reduced integration issues, enabling concurrent development, and increased automation. It requires source code management, automated builds and tests, and developer discipline in integrating changes continuously rather than periodically. Automated continuous integration servers help make the process easy by detecting changes, running builds, and publishing results.

Uploaded by

Abhishek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 30

Introduction to

Continuous Integration

Mike Roberts
This session
• Some slides
• Demonstration
• You!
• Time at end for Q+A but please
shout out if something is unclear
• Law of 2 feet!
Introduction to
Continuous Integration

Or…
A tale of Lava Lamps,
Homer Simpson, and
broken builds
Overview
What?

Why?

How?

Show me!
What?
What is Continuous
Integration?
“ Continuous Integration is a
software development practice
where members of a team
integrate their work frequently,
usually each person integrates at
least daily - leading to multiple
integrations per day. Each
integration is verified by an
automated build (including test) to
detect integration errors as quickly
as possible.“
What is Continuous
Integration?
• “The Daily Build on Steroids”

or…

• “The practice of integrating source


code continuously”
What is “integration” ?

• At a minimum:
– Gather latest source together
– Compile
– Execute tests
– Verify success
What is “integration” ?

• Can include other tasks such as:


– Rebuild the database
– Build release distribution
– Run code analysis and coverage tools
– Generate documentation
How often is continuously?

• As frequently as possible

• More like once per hour than once


per day

• Before leaving at the end of the day


When to integrate?
• Implement just enough, then
integrate
• If using Test Driven Development, it
forms a natural break in the cycle
Test
• Taking small steps
Integrate Code

Refactor
Why?
Why?

• Regular feedback

– For the integrator : “Did that work?”

– For the rest of the team : “Is the build OK?”

– Reduces Risk overall


Why?

• Reduce integration pain

– No more ‘merge hell’

– XP Mantra: Do the ‘hard things’ often so


they’re not hard any more
Why?

• Enables concurrent development

– “We can both work on this today”


Why?

• Increased automation

– Don’t repeat yourself - automate to


increase speed and to make less
mistakes
How?
Technical pre-requisites
• Source Code checked into Source Control

• Automated (fast) build


– Compile
– Test
– command line without interaction

• Dedicated (communal) Integration


Machine
Social pre-requisites

• Developer discipline
– Continuous means continuous, not
‘once per week’

• Shared ownership
Automated CI
• Automated Continuous Integration Server
– CruiseControl, CruiseControl.NET, TeamCity,
Bamboo, etc.

– Detects changes in source control

– Launches integration build

– Publishes results
How does Automated CI
Work?
Why use Automated CI?
• Makes integration easy

• Guarantees integration happens

• Better feedback options

• Encourages test automation


– Through metrics
Immediate Feedback is Key
Immediate Feedback is Key
Social Issues - CI Etiquette
• Fixing a broken build is the highest
priority
• “You broke it, you organise fixing it”
• Do not check in on a broken build
– It makes fixing it harder
• Don’t leave until the integration runs
successfully
• Keep the build quick
Show me!
Where next?
Where next?
• http://martinfowler.com/articles/continuousIntegration.html

• http://cruisecontrol.sourceforge.net/

• http://ccnet.thoughtworks.com/

• Etc…
Introduction to
Continuous Integration

Mike Roberts

http://www.mikebroberts.com/
[email protected]

You might also like