Upload
vuongtram
View
227
Download
1
Embed Size (px)
Citation preview
1 © Nokia Solutions and Networks 2014
Confidential
Continuous Integration (CI)• Nikko Noel Balde
• 10-02-2016
2 © Nokia Solutions and Networks 2014
Confidential
Topic Outline
• Why do we need CI?
• Introduction to CI
• A Typical CI Workflow
• CI Practices
• Jenkins: A CI Server
3 © Nokia Solutions and Networks 2014
Why do we need CI?
Confidential
4 © Nokia Solutions and Networks 2014
Confidential
5 © Nokia Solutions and Networks 2014
Confidential
6 © Nokia Solutions and Networks 2014
Introduction to CI
Confidential
7 © Nokia Solutions and Networks 2014
Confidential
8 © Nokia Solutions and Networks 2014
Eliminate blind spots so you can build and deliver software more rapidly.
Confidential
Continuous Integration (CI)
“Continuous Integration (CI) is a
development practice that requires
developers to integrate code into a
shared repository several times a day.
Each check-in is then verified by an
automated build, allowing teams to
detect problems early.”
“By integrating regularly, you can
detect errors quickly, and locate them
more easily.”
9 © Nokia Solutions and Networks 2014
Confidential
Minimize the
duration and effort
required by "each"
integration
What does CI tries to achieve?
Be able to deliver
"at any moment“ a
product version
suitable for release
10 © Nokia Solutions and Networks 2014
What CI brings to an Organization
Say goodbye to long and tense integrations
Increase visibility which enables greater communication
Catch issues fast
Spend less time debugging and more time adding features
Proceed in the confidence you’re building on a solid foundation
Stop waiting to find out if your code’s going to work
Reduce integration problems allowing you to deliver software more rapidly
Confidential
11 © Nokia Solutions and Networks 2014
What Prevents Teams from using CI
Confidential
Increased overhead in maintaining
the CI system
Additional hardware/software
costs
12 © Nokia Solutions and Networks 2014
A Typical CI Workflow
Confidential
13 © Nokia Solutions and Networks 2014
Confidential
14 © Nokia Solutions and Networks 2014
Confidential
Continuous Integration (CI)
Continuous
• Technically, continuous means
something that once started, never
stops.
• Continuous in the concept of CI is
more like continual.
Integration
• The act of combining separate
source code artifacts to determine
how they work as a whole.
15 © Nokia Solutions and Networks 2014
CI Practices
Confidential
16 © Nokia Solutions and Networks 2014
CI PracticesSingle Source Point
Use a Version Control
System
Confidential
MAINLINE
A single branch of the project
currently under development.
(trunk, master, etc.)
17 © Nokia Solutions and Networks 2014
CI PracticesAutomated Build Scripts
Automate the Build
Confidential
BUILD
A set of activities performed to
generate, test, inspect, and deploy
software.
BUILD SCRIPT
A single script, or set of scripts, you
use to compile, test, inspect, and
deploy software
18 © Nokia Solutions and Networks 2014
CI PracticesSelf-Testing Code
Create tests for your
code
Confidential
19 © Nokia Solutions and Networks 2014
CI PracticesFrequent Commits
Everyone should
commit code as
regularly as possible
Confidential
BULD
A set of activities performed to
generate, test, inspect, and deploy
software.
20 © Nokia Solutions and Networks 2014
CI PracticesIntegration Build Machine
Every Commit Should
Build the Mainline on
a Separate Integration
Build Machine
Confidential
BULD
A set of activities performed to
generate, test, inspect, and deploy
software.
21 © Nokia Solutions and Networks 2014
CI PracticesAlways have a Stable Base
Fix Broken Builds
Immediately
Confidential
22 © Nokia Solutions and Networks 2014
CI PracticesRapid Feedback
Keep the Builds Fast
Confidential
23 © Nokia Solutions and Networks 2014
CI PracticesEasily Accessible Software
Make it Easy for
Anyone to Get the
Latest Executable
Confidential
24 © Nokia Solutions and Networks 2014
CI PracticesStatus Visibility
Everyone should be
able to see Results of
the Latest Build
Confidential
25 © Nokia Solutions and Networks 2014
CI PracticesDon’t…
Don’t commit broken
code!
Confidential
Don’t commit untested
code!
Don’t commit when
the build is broken!
26 © Nokia Solutions and Networks 2014
Jenkins: A CI Server
Confidential
27 © Nokia Solutions and Networks 2014
Confidential
Runs an integration build whenever a change is committed to the version control
repository.
Recommended, but not necessarily required for CI
Examples: CruiseControl, Jenkins
CI Server
28 © Nokia Solutions and Networks 2014
Confidential
• Open source Continuous Integration server written in
Java
• Has a simple configuration through a web-based
GUI, which speeds up Job creation, improves
consistency, and decreases the maintenance costs
• Is a master slave topology that distributes the build
and testing effort over slave servers with the results
automatically accumulated on the master
• Vastly extendable through plugins, with over 400
plugins available
JenkinsA CI Server
29 © Nokia Solutions and Networks 2014
Confidential
To have a look and feel of Jenkins, go to:
https://ci.jenkins-ci.org/
JenkinsDemo
30 © Nokia Solutions and Networks 2014
Confidential
• Continuous Integration: Improving Software Quality and Reducing Risk
By: Paul Duvall
• Jenkins Continuous Integration Cookbook
By: Alan Mark Berg
• Continuous Integration
http://en.wikipedia.org/wiki/Continuous_integration
• Jenkins
http://jenkins-ci.org/
References