let’s start continuous integration with jenkins
DESCRIPTION
This is the presentation in order to describe overview of Continuous Integration and Jenkins for members of my company.TRANSCRIPT
Let’s start
withJenkins
ContinuousIntegration
What’sContinuous
Integration?
OrganizeCurrent problems
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
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
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
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
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
We don’t any more!!
Purpose
Improve quality
Decreasefrustration
Reduce the communication gap with early feedback
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
C Iis the “practice”
but not a “tool”.
Process of CICI server Repository
Monitor
Build server
Process of CICI server Repository
Commit
Build serverDetect
Process of CICI server Repository
Build
Build server
Process of CICI server Repository
Report
Build server
CI is composed of:connection to repositorybuild script
process of integrating source code modification(test, inspection, deployment and feedback)
feedback means such as mail
CI is composed of:connection to repositorybuild script
process of integrating source code modification(test, inspection, deployment and feedback)
feedback means such as mail
CI is composed of:connection to repositorybuild script
process of integrating source code modification(test, inspection, deployment and feedback)
feedback means such as mail
CI is composed of:connection to repositorybuild script
process of integrating source code modification(test, inspection, deployment and feedback)
feedback means such as mail
"Build" in CI meansa series of processesrather thanthe so-called compilationthat is executedat the time of committing
Merit
Reduce risk
Reduce routine
Ensure the source code that can be deployed
Visualizeproject
To be confidentforproducts
Demerit
Load to build CI system -> initial cost
Hardware cost for CI system -> initial + running cost
Maintenance of CI system -> running cost
Frequent build error -> running cost
Question
Do you leave the problem you're having now without any action?
How much cost have we takendue to the problems that has occurred?
Act
What’s
Jenkins?
Merit
1. Easy GUI
2. Easy to install
3. Lots of plugins
4. Leave execution logs
Demerit
1. Frequent update
2. Difficult to understand words for Jenkins
InstallFirst of all
CentOShttps://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+RedHat+distributions
Download & install Jenkinssudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
Check java installationjava -version
Startsudo service jenkins start
Accesshttp://hostname:8080
What can we dowith
Jenkins?
Realize CI environment
Customizationfamiliarto our environment
InspectionJoined testUnit testDeploy
cake
PHP
Redm
ineGit
hub
git
Plugin Plugin Plugin scrum scrum scrum
agile agile agilePractice
Overviewof general system structure
that we’ve ever developed
Mainlyweb application
cakePHP
Whole structure"aiming for the time being"
with using Jenkins
Whole structureRepository
Pull request
BuildReview
Merge
DetectBuild
Whole structureRepository
Push
Build
DetectBuild
Must
Check inspection when committing
Run all unit test script and kick operation test tool when committing
Coverage is reported as a result of test after automated test
Build error is sent to developers automatically
Run all unit test script regularly
Inspection
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
Unit test
Use PHPunit
Use bake
import test result in XML format that is compatible with jUnitxUnit Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin
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
This prevents degradingBut “TDD” is required.
Operation test
Use SeleniumDo operation test with using Selenium manually first.
Use Selenium RCto write test cases using PHPunitit enables us to connect Selenium with Jenkins
Import test result in HTML formatseleniumhtmlreport Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/seleniumhtmlreport+Plugin
Want
Deploy automatically on test serverafter passing unit test
Check differences of commit on browser
Synchronize commit and ticket on redmine
Build test server automaticallywhen dividing branches
Need?
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.
In summary
CI help us realize early feedback.
CI help us realize early feedback.
Early feedback enable us to find bugs at the beginning of test phase and decrease communication gap.
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.
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.
Thank you!!