let’s start continuous integration with jenkins

91
Let’s start with Jenkins Continuous Integration

Upload: tomohide-kakeya

Post on 10-May-2015

3.054 views

Category:

Technology


1 download

DESCRIPTION

This is the presentation in order to describe overview of Continuous Integration and Jenkins for members of my company.

TRANSCRIPT

Page 1: Let’s start Continuous Integration with jenkins

Let’s start

withJenkins

ContinuousIntegration

Page 2: Let’s start Continuous Integration with jenkins

What’sContinuous

Integration?

Page 3: Let’s start Continuous Integration with jenkins

OrganizeCurrent problems

Page 4: Let’s start Continuous Integration with jenkins

Lots of bugs are found at the end of test phase

As the system size increases, load of test gets bigger

Hard to merge manually

Unexpected recognition differences of requirements

Frequently degraded when merge

Page 5: Let’s start Continuous Integration with jenkins

Lots of bugs are found at the end of test phase

As the system size increases, load of test gets bigger

Hard to merge manually

Unexpected recognition differences of requirements

Frequently degraded when merge

Page 6: Let’s start Continuous Integration with jenkins

Lots of bugs are found at the end of test phase

As the system size increases, load of test gets bigger

Hard to merge manually

Unexpected recognition differences of requirements

Frequently degraded when merge

Page 7: Let’s start Continuous Integration with jenkins

Lots of bugs are found at the end of test phase

As the system size increases, load of test gets bigger

Hard to merge manually

Unexpected recognition differences of requirements

Frequently degraded when merge

Page 8: Let’s start Continuous Integration with jenkins

Lots of bugs are found at the end of test phase

As the system size increases, load of test gets bigger

Hard to merge manually

Unexpected recognition differences of requirements

Frequently degraded when merge

Page 9: Let’s start Continuous Integration with jenkins

We don’t any more!!

Page 10: Let’s start Continuous Integration with jenkins

Purpose

Page 11: Let’s start Continuous Integration with jenkins

Improve quality

Page 12: Let’s start Continuous Integration with jenkins

Decreasefrustration

Page 13: Let’s start Continuous Integration with jenkins

Reduce the communication gap with early feedback

Page 14: Let’s start Continuous Integration with jenkins

Continuous integration?Whatis

Continuous integration Continuous integrationContinuous integration Continuous integrationContinuous integration Continuous integrationContinuous integration Continuous integrationContinuous integration Continuous integration

Continuous integration Continuous integrationContinuous integration Continuous integrationContinuous integration Continuous integrationContinuous integration Continuous integrationContinuous integration Continuous integration

Page 15: Let’s start Continuous Integration with jenkins

C Iis the “practice”

but not a “tool”.

Page 16: Let’s start Continuous Integration with jenkins

Process of CICI server Repository

Monitor

Build server

Page 17: Let’s start Continuous Integration with jenkins

Process of CICI server Repository

Commit

Build serverDetect

Page 18: Let’s start Continuous Integration with jenkins

Process of CICI server Repository

Build

Build server

Page 19: Let’s start Continuous Integration with jenkins

Process of CICI server Repository

Report

Build server

Page 20: Let’s start Continuous Integration with jenkins

CI is composed of:connection to repositorybuild script

process of integrating source code modification(test, inspection, deployment and feedback)

feedback means such as mail

Page 21: Let’s start Continuous Integration with jenkins

CI is composed of:connection to repositorybuild script

process of integrating source code modification(test, inspection, deployment and feedback)

feedback means such as mail

Page 22: Let’s start Continuous Integration with jenkins

CI is composed of:connection to repositorybuild script

process of integrating source code modification(test, inspection, deployment and feedback)

feedback means such as mail

Page 23: Let’s start Continuous Integration with jenkins

CI is composed of:connection to repositorybuild script

process of integrating source code modification(test, inspection, deployment and feedback)

feedback means such as mail

Page 24: Let’s start Continuous Integration with jenkins

"Build" in CI meansa series of processesrather thanthe so-called compilationthat is executedat the time of committing

Page 25: Let’s start Continuous Integration with jenkins

Merit

Page 26: Let’s start Continuous Integration with jenkins

Reduce risk

Page 27: Let’s start Continuous Integration with jenkins

Reduce routine

Page 28: Let’s start Continuous Integration with jenkins

Ensure the source code that can be deployed

Page 29: Let’s start Continuous Integration with jenkins

Visualizeproject

Page 30: Let’s start Continuous Integration with jenkins

To be confidentforproducts

Page 31: Let’s start Continuous Integration with jenkins

Demerit

Page 32: Let’s start Continuous Integration with jenkins

Load to build CI system -> initial cost

Hardware cost for CI system -> initial + running cost

Page 33: Let’s start Continuous Integration with jenkins

Maintenance of CI system -> running cost

Frequent build error -> running cost

Page 34: Let’s start Continuous Integration with jenkins

Question

Page 35: Let’s start Continuous Integration with jenkins

Do you leave the problem you're having now without any action?

Page 36: Let’s start Continuous Integration with jenkins

How much cost have we takendue to the problems that has occurred?

Page 37: Let’s start Continuous Integration with jenkins

Act

Page 38: Let’s start Continuous Integration with jenkins

What’s

Jenkins?

Page 39: Let’s start Continuous Integration with jenkins

Merit

Page 40: Let’s start Continuous Integration with jenkins

1. Easy GUI

2. Easy to install

3. Lots of plugins

4. Leave execution logs

Page 41: Let’s start Continuous Integration with jenkins

Demerit

Page 42: Let’s start Continuous Integration with jenkins

1. Frequent update

2. Difficult to understand words for Jenkins

Page 43: Let’s start Continuous Integration with jenkins

InstallFirst of all

Page 49: Let’s start Continuous Integration with jenkins

What can we dowith

Jenkins?

Page 50: Let’s start Continuous Integration with jenkins

Realize CI environment

Page 51: Let’s start Continuous Integration with jenkins

Customizationfamiliarto our environment

Page 52: Let’s start Continuous Integration with jenkins

InspectionJoined testUnit testDeploy

cake

PHP

Redm

ineGit

hub

git

Plugin Plugin Plugin scrum scrum scrum

agile agile agilePractice

Page 53: Let’s start Continuous Integration with jenkins

Overviewof general system structure

that we’ve ever developed

Page 54: Let’s start Continuous Integration with jenkins

Mainlyweb application

Page 55: Let’s start Continuous Integration with jenkins

cakePHP

Page 56: Let’s start Continuous Integration with jenkins
Page 57: Let’s start Continuous Integration with jenkins
Page 58: Let’s start Continuous Integration with jenkins

Whole structure"aiming for the time being"

with using Jenkins

Page 59: Let’s start Continuous Integration with jenkins

Whole structureRepository

Pull request

BuildReview

Merge

DetectBuild

Page 60: Let’s start Continuous Integration with jenkins

Whole structureRepository

Push

Build

DetectBuild

Page 61: Let’s start Continuous Integration with jenkins

Must

Page 62: Let’s start Continuous Integration with jenkins

Check inspection when committing

Page 63: Let’s start Continuous Integration with jenkins

Run all unit test script and kick operation test tool when committing

Page 64: Let’s start Continuous Integration with jenkins

Coverage is reported as a result of test after automated test

Page 65: Let’s start Continuous Integration with jenkins

Build error is sent to developers automatically

Page 66: Let’s start Continuous Integration with jenkins

Run all unit test script regularly

Page 67: Let’s start Continuous Integration with jenkins

Inspection

Page 68: Let’s start Continuous Integration with jenkins

coverage: Clover PHP Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/Clover+PHP+Plugin

coding convention: Checkstyle Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin

duplicate code: DRY Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/DRY+Plugin

conplicated: PMD Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/PMD+Plugin

Page 69: Let’s start Continuous Integration with jenkins

Unit test

Page 70: Let’s start Continuous Integration with jenkins

Use PHPunit

Page 71: Let’s start Continuous Integration with jenkins

Use bake

Page 72: Let’s start Continuous Integration with jenkins

import test result in XML format that is compatible with jUnitxUnit Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin

Page 73: Let’s start Continuous Integration with jenkins

Register script to run 'AllTests'./_lib/app/Console/cake test \-log-junit=./reports/unittest.xml \-coverage-html=./reports/coverage_html \-coverage-clover=./reports/coverage.xml \app AllTests

Page 74: Let’s start Continuous Integration with jenkins

This prevents degradingBut “TDD” is required.

Page 75: Let’s start Continuous Integration with jenkins

Operation test

Page 76: Let’s start Continuous Integration with jenkins

Use SeleniumDo operation test with using Selenium manually first.

Page 77: Let’s start Continuous Integration with jenkins

Use Selenium RCto write test cases using PHPunitit enables us to connect Selenium with Jenkins

Page 78: Let’s start Continuous Integration with jenkins

Import test result in HTML formatseleniumhtmlreport Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/seleniumhtmlreport+Plugin

Page 79: Let’s start Continuous Integration with jenkins

Want

Page 80: Let’s start Continuous Integration with jenkins

Deploy automatically on test serverafter passing unit test

Page 81: Let’s start Continuous Integration with jenkins

Check differences of commit on browser

Page 82: Let’s start Continuous Integration with jenkins

Synchronize commit and ticket on redmine

Page 83: Let’s start Continuous Integration with jenkins

Build test server automaticallywhen dividing branches

Page 84: Let’s start Continuous Integration with jenkins

Need?

Page 85: Let’s start Continuous Integration with jenkins

Create documents automatically

Documents are not only for maintenance but also one of the most important method to share recognition between producer and developer in offshore development.

Page 86: Let’s start Continuous Integration with jenkins

In summary

Page 87: Let’s start Continuous Integration with jenkins

CI help us realize early feedback.

Page 88: Let’s start Continuous Integration with jenkins

CI help us realize early feedback.

Early feedback enable us to find bugs at the beginning of test phase and decrease communication gap.

Page 89: Let’s start Continuous Integration with jenkins

CI help us realize early feedback.Early feedback enable us to find bugs at the beginning of test phase and decrease communication gap.

Automated test enable to decrease degrade and load for test.

Page 90: Let’s start Continuous Integration with jenkins

CI help us realize early feedback.Early feedback enable us to find bugs at the beginning of test phase and decrease communication gap.Automated test enable to decrease degrade and load for test.

Jenkins provide us for comfortable CI environment.

Page 91: Let’s start Continuous Integration with jenkins

Thank you!!