Upload
pavan-gupta
View
299
Download
8
Tags:
Embed Size (px)
Citation preview
Agenda
• What is Continuous Integration ?• Why Jenkins ?• Introduction of Jenkins ecosystem.• Hands On.
Before CI
• Integration was a long and unpredictable process
• Take more than several months for a project developed in a couple of years
Note: Dependencies missing & Env Conf issue
Why CI
• Know when you break existing functionality. – Issues are typically easier to address
• the sooner they are found.• when the number of changes between working and
failing is small.
• Visibility into health of project– Fail fast – If there is a problem, discover and plan
for it early. – Don’t wait until the end of your project to realize it
doesn’t work.
Build every commit• Why not compile frequently?• Why not integrate frequently?• Agile principles
– If it hurts, do it more often. – Reduce time between defect introduction
and removal• Automate the build
– Key to continuous integration
Jenkins Project
• Open-source CI server
• Easy to install and use– jenkins.war– Or the OS-specific packages– Configure everything from the browser
• Extensible– 500+ plugins by the community– Easy to develop its own plugins
Easy install, easy upgrade, easy configuration Distributed builds – Arguably most powerful feature. Monitoring external jobs No limit to the number of jobs, number of slave nodes Plugin architecture: Support for various version control systems,
authentication methods, notification, workflow building, and many more features can be added.
Jenkins provides machine-consumable remote access API to its functionalities
Why Jenkins?
Where Jenkins Stands?
Jenkins; 768
Hudson; 515
Bamboo; 178
CruiseControl;
168TeamCity; 96 QuickBuild; 7
Number of Jobs on Dice.com
Common CI Components
• Software Repository (git, svn, cvs)• Build Software
– Build scripts (Batch, Ant, Maven, Make, Rake, Scoons)• Monitor and trigger process
– Software package that monitors software repositories for changes and triggers a build
– Identifies and reports failures/successes• Automated Testing
– Unit, Integration, System, X-ability testing• Metrics Collection and Reporting
– ESLOC, Test Counts, Code Coverage, performance data, …
Common CI Workflow
Version Control Build Unit
TestIntegration
TestSystem
Test
Reporting / Monitoring / Metrics
Continuous Integration Manager
Major Functionalities
• Integrate with many different version control systems• Generate test reports• Push to various artifact repositories• Deploys directly to production or test environments.• Publish test results, dev docs and health report • notifications
Platforms Supported
Windows Ubuntu/Debian Red Hat/Fedora/CentOS Mac OS X openSUSE FreeBSD OpenBSD Solaris/OpenIndiana Gentoo
Advanced Build Job Configuration
● Parallel builds
● Parameterized builds
● Injecting Environment Variables
● Build Pipelines
● Distributed Builds
Advanced ++
• Jenkins REST API– https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API
• Cloudbees• EC2 Plugin• Backups, Disk Space, Server load
Principles• Maintain a code repository• Automate the build• Make the build self-testing• Everyone commits to the baseline every day• Every commit should be built• Keep the build fast• Test in a clone of the production environment• Automatic deployment
More Resources
• http://jenkins-ci.org/
• The most famous article on the subject :• http://www.martinfowler.com/articles/continuousIntegration.html
• Google Group & JIRA • https://groups.google.com/forum/#!forum/jenkinsci-users• https://issues.jenkins-ci.org/secure/Dashboard.jspa
• An introduction in video of Jenkins by its creator :• http://vimeo.com/35678536