****** DevOps Training : https://www.edureka.co/devops ******
This DevOps Jenkins Tutorial on what is Jenkins ( Jenkins Tutorial Blog Series: https://goo.gl/JebmnW ) will help you understand what is Continuous Integration and why it was introduced. This tutorial also explains how Jenkins achieves Continuous Integration in detail and includes a Hands-On session around Jenkins by the end of which you will learn how to compile a code that is present in GitHub, Review that code and Analyse the test cases present in the GitHub repository. The Hands-On session also explains how to create a build pipeline using Jenkins and how to add Jenkins Slaves.
The Hands-On session is performed on an Ubuntu-64bit machine in which Jenkins is installed.
To learn how Jenkins can be used to integrate multiple DevOps tools, watch the video titled 'DevOps Tools', by clicking this link: https://goo.gl/up9iwd
Check our complete DevOps playlist here: http://goo.gl/O2vo13
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
2. www.edureka.co/devops
Do you know the following?
Why We Need
Continuous Integration?
What Is Continuous
Integration?
Hands-On
What Is Jenkins?
1
4
6
Jenkins Distributed
Architecture
5
Continuous Integration
Tools
3
2
5. www.edureka.co/devops
Problems Before Continuous Integration
Developers have to wait till the complete software is
developed for the test results.
If the test fails then locating and fixing bugs is very difficult.
Developers have to check the entire source code of the
software.
Entire source code of
the software
I hope the
code works
fine in
testing
I have to
check the
entire source
code
6. www.edureka.co/devops
Problems Before Continuous Integration
Software delivery process was slow
Continuous feedback pertaining to things like coding or
architectural issues, build failures, test status etc. was
not present
The Feedback loop
Build, Measure and
Learn
8. www.edureka.co/devops
Continuous Integration To The Rescue
• Since after every commit to the source code an auto build is triggered and then it is automatically deployed on the test
server.
• If the test results shows that there is a bug in the code then the developers only have to check the last commit made to
the source code.
• This also increases the frequency of new software releases
• The concerned teams are always provided with the relevant feedback
9. www.edureka.co/devops
Continuous Integration To The Rescue
Before Continuous
Integration
The entire source code
was built and then tested.
Developers have to wait
for test results
No Feedback
After Continuous
Integration
Every commit made in the
source code is built and
tested.
Developers know the test
result of every commit
made in the source code
on the run
Feedback is present
11. www.edureka.co/devops
What Is Continuous Integration
• Continuous Integration is a development practice in which the developers are required to
commit changes to the source code in a shared repository several times a day or more
frequently.
• Every commit made in the repository is then built. This allows the teams to detect the
problems early.
Commit Changes To
The Source Code
Compile The Code Test Deploy
Continuous
Integration
Server
Feedback
13. www.edureka.co/devops
Continuous Integration Case-Study: Nokia
Problem Statement:
• In Nokia a process called Nighly build was used.
• In this process every night an automated system pulls
the code added to the shared repository throughout
the day and builds that code.
• Since the code that was built at night was quite large,
locating and fixing of bugs was a real pain.
14. www.edureka.co/devops
Continuous Integration Case-Study: Nokia
Solution:
• Nokia adopted Continuous Integration (CI).
• As a result, every commit made to the source code in
the repository was built.
• If the build result shows that there is a bug in the
code, then the developers only need to check that
particular commit.
18. www.edureka.co/devops
What Is Jenkins?
Jenkins is an open source automation tool written in Java with plugins built for Continuous Integration purpose. Plugins
allows integration of various DevOps stages.
19. www.edureka.co/devops
Jenkins Plugins
Jenkins supports plugins, which allow Jenkins to be extended to meet specific needs of individual
projects
Plugin Categorization
Test Reports Notification Deployment Compile
HTML Publisher Jenkins Build
Notifications
Plugin
Deploy Plugin
22. www.edureka.co/devops
Jenkins
Server
Prepares a build
• Developers commit changes to the source code
• Continuous Integration server pulls that code and triggers a build
Jenkins Example
Developer
Developer
Developer
Source Code
Repository
Feedback
23. www.edureka.co/devops
Jenkins
Server
Testing
Prepares a build
• Developers commit changes to the source code
• Continuous Integration server pulls that code and triggers a build
• The build application is then deployed on the testing server for testing
Jenkins Example
Developer
Developer
Developer
Source Code
Repository
Feedback
24. www.edureka.co/devops
Jenkins
Server
Production
Prepares a build
• Developers commit changes to the source code
• Continuous Integration server pulls that code and triggers a build
• The build application is then deployed on the testing server for testing
• After testing the application, it is then deployed on the production server
• The concerned teams are constantly notified about the build and test results
Jenkins Example
TestingDeveloper
Developer
Developer
Source Code
Repository
Feedback
26. www.edureka.co/devops
If you need to run web tests using Internet
Explorer, you need to use a Windows machine.
Another build job may require Linux box.
Shortcomings Of Single Jenkins Server
How to manage spikes in build activity
29. www.edureka.co/devops
Jenkins Delivery Pipeline
Unit Test Acceptance test
Code coverage &
static analysis
Deploy to
Integration
Integration Test
Regression test
UAT &
Performance Test
Alerts & Report
Notes
Deploy to Prod
• The product is developed and tested. A small change is made in the code and is checked to SCR that triggers UT
• On success, automatically trigger acceptance tests & produce code-coverage and static analysis report
• If the acceptance tests succeeds, system will trigger the deployment of project to an integration environment
• Now, invoke integration test suite & regression test suite
• If these pass, the system triggers UAT and performance test
• On success, automatically promote the project to release repository and notify the developer about the result.