continuous integration ( jen kins travis ci)
TRANSCRIPT
1
Continuous integration ( JenKins / Travis CI)
2
What’s continuous integration(CI)“ Continuous Integration is a software development
practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible”
- Martin Fowler
3
What’s continuous integration(CI)
4
Why continuous integration?
Integration is hard , effort increase exponentially with
Number of components
Number of bugs
Time since last integration
5
CI – What does it really mean? Integrated All changes up until that point are combined into the
project Built The code is compiled into an executable or package
Tested Automated test suites are run
Archived Versioned and stored so it can be distributed as is, if
desired
Deployed Loaded onto a system where the developers can interact
with it
6
Continuous integration benefits
Immediate bug detection
Reduce risk of cost schedule and budget
Measurable & visible code quality
Continuous automatic regression unit test
Record of evolution of the project
7
CI tools
8
Travis CI
9
What is Travis CI
A hosted continuous integration service.It is integrated with GitHub
10
What can Travis CI do?Monitor GitHub projects
Run Tests
Provide feedback
Build artefacts
Check code quality
Deploy to cloud services
Whatever you can make it do
11
How does Travis CI work
12
To get started with Travis CI:
Sign in to Travis CI with your GitHub account, accepting the GitHub access permissions confirmation
Once you’re signed in, and Travis CI synchronized your repositories from GitHub, go to your profile page and enable Travis CI for the repository you want to build.
13
To get started with Travis CI
Add a .travis.yml file to your repository to tell Travis CI what to build:Travis CI tests this project against three versions of Ruby and the latest version of Rubinius.
Add the .travis.yml file to git, commit and push, to trigger a Travis CI build:
Check the build status page to see if your build passes or fails.
14
How does Travis CI work
15
Features of Travis CI
Automatic integration with GitHub
First class support for 21 languages
Pre –installed build & test tools
Available services- databases , message queues
Encrypt secure environment variables or files
Clean environment
16
Support platformsOS :Linux ,macAnroidC++CC# Java PhpPerl PythonVisual basicJava scriptGo Groovy
17
Advantages of Travis CIEasy to configure & use
High speed
It’s popular
Great integration with GitHub & cloud services
18
Disadvantages of Travis CI
No manual builds
No build pipelines
Not suitable for high security projects
Less extensible than JenKins
19
Jenkins
20
Branched from Hudson
Java based Continuous Build System
Runs in servlet container
Glassfish, Tomcat
Supported by over 400 plugins
Under development since 2005
http://jenkins-ci.org/
21
2005 - Hudson was first release by Kohsuke Kawaguchi of Sun Microsystems
2010 – Oracle bought Sun Microsystems
Due to a naming dispute, Hudson was renamed to Jenkins
Oracle continued development of Hudson (as a branch of the original)
Jenkins - History
22
Features of jenkins
Easy installation
Easy configuration
Rich plug in ecosystem
Extensibility
Distributed builds
Flexibility
23
Installation
Use one of the platform-specific package/installer links on the Jenkins site to install Jenkins on your system
You can download jenkins.war directly and launch it by executing java -jar jenkins.war. This is basically the same set up as the test drive, except that the output will go to console, not to a window.On Windows, you can even choose to install Jenkins as a service afterwardsLicenseJenkins is distributed under the MIT License
24
jenKins requirements
Web server(Tomcat , WebLogic)
Build tool (Maven, Ant)
SCM(Git, Svn , Cvs)
25
jenKins plugins Build triggers
Source code management
Build tools
Build wrappers
Build notifiers
Build reports
Authentication and user management
26
What can Jenkins do?
Generate test reports
Integrate with many different Version Control Systems
Push to various artefact repositories
Deploys directly to production or test environments
Notify stakeholders of build status
27
Setup
When setting up a project in Jenkins, out of the box you have the following general options:
Associating with a version control server Triggering builds Polling, Periodic, Building based on other projects Execution of shell scripts, bash scripts, Ant targets,
and Maven targets Artefact archival Publish JUnit test results and Javadocs Email notifications Plugins expand the functionality even further
28
Building
Once a project is successfully created in Jenkins, all future builds are automatic
Building*Jenkins executes the build in an executer
*Jenkins also has the concept of slave build servers . Useful for building on different architectures . Distribution of load
29
Reporting
Jenkins comes with basic reporting features
Keeping track of build status
Last success and failure
“Weather” – Build trend
These can be greatly enhanced with the use of pre-build plugins
Unit test coverage
Test result trending
Findbugs, Checkstyle, PMD
30
Who is using Jenkins?
31
Travis CI vs JenKins
TRAVIS CI
Commercial Service Convention Easy to use
JENKINS
Open-Source Application Configuration Flexible
32
References
http://www.uqasar.eu/review-saas-continuous-integration-tools-series/Continuous Integration (Jenkins/Hudson) - SlideShare[PPT]CI-201110.ppt[PDF]Jenkins Continuous Build Systemhttp://www.slideshare.net/bsiggelkow/travis-cihttp://www.slideshare.net/gabevanslv/travis-ci-23997525?related=1https://docs.travis-ci.com/user/getting-started/
33
Thank you!