Let’s start Continuous Integration with jenkins
-
Upload
tomohide-kakeya -
Category
Technology
-
view
3.046 -
download
1
description
Transcript of Let’s start Continuous Integration with jenkins
![Page 1: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/1.jpg)
Let’s start
withJenkins
ContinuousIntegration
![Page 2: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/2.jpg)
What’sContinuous
Integration?
![Page 3: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/3.jpg)
OrganizeCurrent problems
![Page 4: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/4.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/5.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/6.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/7.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/8.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/9.jpg)
We don’t any more!!
![Page 10: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/10.jpg)
Purpose
![Page 11: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/11.jpg)
Improve quality
![Page 12: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/12.jpg)
Decreasefrustration
![Page 13: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/13.jpg)
Reduce the communication gap with early feedback
![Page 14: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/14.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/15.jpg)
C Iis the “practice”
but not a “tool”.
![Page 16: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/16.jpg)
Process of CICI server Repository
Monitor
Build server
![Page 17: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/17.jpg)
Process of CICI server Repository
Commit
Build serverDetect
![Page 18: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/18.jpg)
Process of CICI server Repository
Build
Build server
![Page 19: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/19.jpg)
Process of CICI server Repository
Report
Build server
![Page 20: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/20.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/21.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/22.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/23.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/24.jpg)
"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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/25.jpg)
Merit
![Page 26: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/26.jpg)
Reduce risk
![Page 27: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/27.jpg)
Reduce routine
![Page 28: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/28.jpg)
Ensure the source code that can be deployed
![Page 29: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/29.jpg)
Visualizeproject
![Page 30: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/30.jpg)
To be confidentforproducts
![Page 31: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/31.jpg)
Demerit
![Page 32: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/32.jpg)
Load to build CI system -> initial cost
Hardware cost for CI system -> initial + running cost
![Page 33: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/33.jpg)
Maintenance of CI system -> running cost
Frequent build error -> running cost
![Page 34: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/34.jpg)
Question
![Page 35: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/35.jpg)
Do you leave the problem you're having now without any action?
![Page 36: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/36.jpg)
How much cost have we takendue to the problems that has occurred?
![Page 37: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/37.jpg)
Act
![Page 38: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/38.jpg)
What’s
Jenkins?
![Page 39: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/39.jpg)
Merit
![Page 40: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/40.jpg)
1. Easy GUI
2. Easy to install
3. Lots of plugins
4. Leave execution logs
![Page 41: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/41.jpg)
Demerit
![Page 42: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/42.jpg)
1. Frequent update
2. Difficult to understand words for Jenkins
![Page 43: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/43.jpg)
InstallFirst of all
![Page 44: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/44.jpg)
CentOShttps://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+RedHat+distributions
![Page 45: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/45.jpg)
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
![Page 46: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/46.jpg)
Check java installationjava -version
![Page 47: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/47.jpg)
Startsudo service jenkins start
![Page 48: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/48.jpg)
Accesshttp://hostname:8080
![Page 49: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/49.jpg)
What can we dowith
Jenkins?
![Page 50: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/50.jpg)
Realize CI environment
![Page 51: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/51.jpg)
Customizationfamiliarto our environment
![Page 52: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/52.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/53.jpg)
Overviewof general system structure
that we’ve ever developed
![Page 54: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/54.jpg)
Mainlyweb application
![Page 55: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/55.jpg)
cakePHP
![Page 56: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/56.jpg)
![Page 57: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/57.jpg)
![Page 58: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/58.jpg)
Whole structure"aiming for the time being"
with using Jenkins
![Page 59: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/59.jpg)
Whole structureRepository
Pull request
BuildReview
Merge
DetectBuild
![Page 60: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/60.jpg)
Whole structureRepository
Push
Build
DetectBuild
![Page 61: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/61.jpg)
Must
![Page 62: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/62.jpg)
Check inspection when committing
![Page 63: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/63.jpg)
Run all unit test script and kick operation test tool when committing
![Page 64: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/64.jpg)
Coverage is reported as a result of test after automated test
![Page 65: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/65.jpg)
Build error is sent to developers automatically
![Page 66: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/66.jpg)
Run all unit test script regularly
![Page 67: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/67.jpg)
Inspection
![Page 68: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/68.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/69.jpg)
Unit test
![Page 70: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/70.jpg)
Use PHPunit
![Page 71: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/71.jpg)
Use bake
![Page 72: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/72.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/73.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/74.jpg)
This prevents degradingBut “TDD” is required.
![Page 75: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/75.jpg)
Operation test
![Page 76: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/76.jpg)
Use SeleniumDo operation test with using Selenium manually first.
![Page 77: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/77.jpg)
Use Selenium RCto write test cases using PHPunitit enables us to connect Selenium with Jenkins
![Page 78: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/78.jpg)
Import test result in HTML formatseleniumhtmlreport Pluginhttps://wiki.jenkins-ci.org/display/JENKINS/seleniumhtmlreport+Plugin
![Page 79: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/79.jpg)
Want
![Page 80: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/80.jpg)
Deploy automatically on test serverafter passing unit test
![Page 81: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/81.jpg)
Check differences of commit on browser
![Page 82: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/82.jpg)
Synchronize commit and ticket on redmine
![Page 83: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/83.jpg)
Build test server automaticallywhen dividing branches
![Page 84: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/84.jpg)
Need?
![Page 85: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/85.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/86.jpg)
In summary
![Page 87: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/87.jpg)
CI help us realize early feedback.
![Page 88: Let’s start Continuous Integration with jenkins](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/88.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/89.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/90.jpg)
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](https://reader030.fdocuments.in/reader030/viewer/2022020110/554f41aeb4c905423f8b45b2/html5/thumbnails/91.jpg)
Thank you!!