9
Continuous Integration (CI) Continuous Integration (CI) In Software Development Prepared by Nhan Nguyen Nov 2014

Continuous integration - CI

Embed Size (px)

Citation preview

Page 1: Continuous integration - CI

Continuous Integration (CI) Continuous Integration (CI)

In Software Development

Prepared by Nhan NguyenNov 2014

Page 2: Continuous integration - CI

Have you ever faced:

Overnight to fix the integration defects when

release date comingrelease date coming

No time left for testing and fixing defects found

Become tense, not confident when delivering

product to customer

2 / 09

Spent large time for deployment activities

(staging, production)

Page 3: Continuous integration - CI

You don’t get benefits of

Because:

You don’t get benefits of

Continuous Integration

practice yet.

3 / 09

practice yet.

Page 4: Continuous integration - CI

What is 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 several times a day. Each check-in is then verified by an

automated build, allowing teams to detect problems early.

4 / 09

Page 5: Continuous integration - CI

How to apply CI at Team-side ?

User story is defined and should be done no more than 3 working days

UT test script is developed along with functional code

Source code is integrated as soon as user story doneSource code is integrated as soon as user story done

US #1

US #2

US #4

timeline

US #3

5 / 09

Repository

Page 6: Continuous integration - CI

Setting up CI server with CI tools

Making configurations for build, testing, deploying…

CI tool auto. gets latest code, make build/run tests… and notifies the

How to apply CI at Server side ?

CI tool auto. gets latest code, make build/run tests… and notifies the

results

CI Server

Repository

6 / 09

timelineUS #1 US #2 US #3 US #4

Page 7: Continuous integration - CI

Automated

Acceptance test

Overall Model

`

Source ControlServer

Development with TDD, local build

Development with TDD, local build

CI Server

Get the latest source code

Tag the stable build

Acceptance testServer

Build Script

Feedbacks

7 / 09

Development with TDD, local build

ProductionServer

Build Script

Automated Unit

test

Automated Unit test

(integrated code)

Automated build,

analyze code

Page 8: Continuous integration - CI

What can be automated?

Make build

Report integration defects

Trigger to run defined testsTrigger to run defined tests

Report test coverage

Notify build/test results

Perform static code analysis

(coding standard, potential bug, low performance code…)

Deploy stable builds (staging, production)

With more than 1000 plug-ins, CI tools supported most of

platforms and programming languages, you can find more

8 / 09

platforms and programming languages, you can find more

benefits when applying CI practice.

Drawbacks:Configuration is time consuming step but it just be done one time

Page 9: Continuous integration - CI

References

CI tools: Jenkins, Bamboo, Cloudbees…

CI is one of 12 principles of Extreme Programming: link

Jenkins plug-ins: linkJenkins plug-ins: link