15
CONTINUOUS INTEGRATION ~ A GLANCE AT AGILE DEVELOPMENT AND EXTREME PROGRAMMING~ Tran Duc Thang Framgia 22/6/2013

Continuous integration - ThangTD

Embed Size (px)

DESCRIPTION

A look at Continuous Integration and the most powerful CI server, Jenkins.

Citation preview

Page 1: Continuous integration - ThangTD

CONTINUOUS INTEGRATION

~ A GLANCE AT AGILE DEVELOPMENT AND EXTREME PROGRAMMING~

Tran Duc ThangFramgia 22/6/2013

Page 2: Continuous integration - ThangTD

Contents

I. Introduction to Continuous Integration

II. Practice Continuous Integration

III. Introduction to Jenkins

IV. Disadvantages

Page 3: Continuous integration - ThangTD

Introduction to CONTINUOUS INTEGRATION

Agile Development

• Agile development is a philosophy, not a method or process.

• An Agile method is a process that support the agile philosophy.

• One of the Agile methods is Extreme Programming. (XP)

Page 4: Continuous integration - ThangTD

Introduction to CONTINUOUS INTEGRATION

Extreme Programming (XP)

• XP is the most prominent Agile Development method.

• XP, like other Agile Development methods, is a set of practices.

• The XP core practices Whole Team

Planning Game

Small Releases

Customer Tests

Simple Design

Pair Programming

Test-Driven Development

Design Improvement

Continuous Integration

Collective Code Ownership

Coding Standard

Metaphor

Sustainable Pace

Page 5: Continuous integration - ThangTD

Introduction to CONTINUOUS INTEGRATION

Continuous Integration – The concept

• one of the Agile practices ! CI was first named and proposed as part of XP. Now, many organizations have adopted CI without adopting all of XP.

• requires developers to integrate code into a shared repository several times a day.

• each check-in is verified by an automated build, allowing teams to detect problems early.

Page 6: Continuous integration - ThangTD

Introduction to CONTINUOUS INTEGRATION

Continuous Integration – The goal

• “Continuous Integration doesn’t get rid of bugs, but it does make them dramatically easier to find and remove.”

• To make your project able to deploy at any time !

Page 7: Continuous integration - ThangTD

Introduction to CONTINUOUS INTEGRATION

Continuous Integration feat Test-Drive Development

• CI was originally intended to be used in combination with TDD.

• CI without TDD is too risky.

• TDD without CI only proves your code work well on your own computer.

Page 8: Continuous integration - ThangTD

Practice Continuous Integration

Only one rule : NEVER BREAK THE BUILD !

• What works on your computer will work on anybody's computer. The reason like “It has been working well on my computer” is just invalid !

• The code that has not been proven to build successfully should not appear in the mainline.

Page 9: Continuous integration - ThangTD

Practice Continuous Integration

You need a spare development machine to act as a centre integration machine. It is called CI Server.

• https://circleci.com/

• https://drone.io/

• https://www.codeship.io/

• CruiseControl

• TeamCity

• Hudson

• Jenkins

• …

Page 10: Continuous integration - ThangTD

Introduction to Jenkins

Jenkins – An Overview

• In 2004, Kohsuke Kawaguchi started the project as a hobby project under the name of Hudson.

• In 2011, not long after Sun was purchased by Oracle, Kohsuke Kawaguchi and many other core developers from Hudson forked to a new project, based on Hudson. It is Jenkins.

• By 2010 Jenkins (Hudson) had dominated the Continuous Integration Solution Market, with the market share of over 70%.

• Jenkins is now used widely by many big companies: Mozilla, LinkedIn, Motorola, eBay, Yahoo!, Red Hat, NTT Data, Gree, DeNa …

Page 11: Continuous integration - ThangTD

Introduction to Jenkins

Why Jenkins ?

• Cross-platform tool. (written in Java)

• Large community.

• Numbers of plug-in.

• Supports many programming languages (Java, PHP, Ruby, Python …)

• IT IS AN OPEN SOURCE PROJECT. IT IS FREE !!!

Page 12: Continuous integration - ThangTD

Introduction to Jenkins

What can Jenkins do ?

• DEMO

• http://jenkins.mozilla.org/

• http://ci.jenkins-ci.org/

Page 13: Continuous integration - ThangTD

Disadvantages

Nothing is perfect. CI still has disadvantages

• Take lots of time for the initial setup, as well as the training to get acquainted with CI server.

• Requires many resources for running CI server.

• Required high programming skill. CI can not work well without the professional programmers who can design and write well-developed test-suites.

Page 14: Continuous integration - ThangTD

References

• http://softwaretest.jp/quality/

• http://www.thoughtworks.com/continuous-integration

• http://www.jamesshore.com/agile-book/

• http://www.ibm.com/developerworks/rational/library/continuous-integration-agile-development/

• http://jenkins-php.org/

• …

Page 15: Continuous integration - ThangTD

CONTINUOUS INTEGRATION is more than a practice,

IT IS AN ART!