[Quang nguyen] Continuous Integration XP Day 2015 Vietnam Danang

Preview:

Citation preview

Continuous Integration@XPDay Da Nang 2015

Quang Nguyen

Write my very first program in Scheme

language

Start with Java2002

2004

Get introd-uced to XP

First reading about Agile/

Scrum2008

2010Jump to Agile

World

...still a long journey

Stop me for questions

http://anthonyfrasier.com

When you have Jenkin (or Hudsons), you have

CI.Is it corected?

WHAT?

Continuous Integration

Coined by Kent Beck as a part of eXtreme Programming (1996-1999).

Integrate work frequently into mainline.

Multiple integrations per day.

Integration verified by automated tests.

Detect integration errors early.

http://martinfowler.com/articles/continuousIntegration.html

Definitions & Mindset• Develop (code & tests)

• Compile

• Test

• Integrate

• Test more

• Integrate more

• ...

Definitions & MindsetCI is a Software Development Practice

Involving a change of mindsetThink CI as a part of the development effort, not as a separate item

Think CI as a prerequisite for Agile software development practices

• Develop (code & tests)

• Compile

• Test

• Integrate

• Test more

• Integrate more

• ...

What CI is NOT• IT IS NOT A SOFTWARE TOOL

• IT IS NOT A BUILD ENVIRONMENT

• IT IS NOT ABOUT HAVING NIGHTLY BUILDS

• IT IS NOT A CHECKBOX ON A TODO LIST

When you have Jenkin (or

Hudsons), you have CI.

Is it corected?

WHY?

Feedback in SW Development

Develop Test

Inspect/Learn

Adapt/Improve

Feedback in SW Development

Develop Test

Inspect/Learn

Adapt/Improve

Customer

Inspect/Learn

Agile  with  CI

Time

Fee

dba

ck

Waterfall

Agile  without  CI

Why not go for it?

- Increased overhead in

maintaining the CI system

- Too much feedback to act upon

- Additional hardware/software

cost

- Developers should be performing

these activities

- We have too complex a product

- Processes are

preventing us from

committing Frequently

- We don’t have time to do this

- Merging is too laborious

- We cannot do all the tests before

commit/delivery

- Good quality is a prerequisite

for CI

- The tasks have too many

dependencies

- We have never

seen a system

tester

- Branching for

features were

required from us

So… How can it fail?

Embracing the excuses

Not caring about it

Excuse #238:We don’t have time to do this

HOW?

CI Framework & Interactions

Build  System

Test  AutomationFramework

SUTsSystem  Under  

TestCI  Server

Bug  Tracking  System

Test  Management  System

Version  Control  System

(Subversion,  GIT)

Maximize SEPARATION Maximize INTEGRATION

Branching strategies

Some CI System

Best Practices - Level 1

Maintain a single source repository

Commit often

Always  integrate

Always  green  light  (100%  tests  passed)

Fix  immediately  when  broken

Always  improve

Best Practices - Level 2Automate the build

Make your build self-testing

Every commit should build on an integration machine

Keep the build fast

Test in a clone of the production environment

Make it easy for anyone to get the latest executable

Everyone can see what’s happening

Automate deployment

http://en.wikipedia.org/wiki/Continuous_integration

PLUS

CI to CD to DevOps

plan code build test release deploy operate

Agile  Development

Continuous  Integration

Continuous  Delivery

DevOps

Extreme Feedback System

http://jenkins-ci.org/content/extreme-feedback-lamp-switch-gear-style

Extreme Feedback System

Raspberry PI

5V Relay Module With Optocoupler

Led lights

Extreme Feedback System

Extreme Feedback System

Feedback Concerns

Questions

Conclusions

more…

Sharings

Quang Nguyen

quang.d.nguyen@dektech.com.au

quangnguyen111@gmail.com

Recommended