Jenkins tool. In the world of IT sector Jenkins automation tool is very famous and useful. So, I think everyone will be aware about it. Here we are going to learn What is Jenkins and Its build process in detail? In the end of tutorial we will bind up some Jenkins basic terminology.
https://linuxdady.com/jenkins-tool/
1. LinuxDady.Com
What is Jenkins tool for beginners?
For more information visit
https://linuxdady.com
Jenkins tool and its basic
terminology
2. Jenkins tool. In the world of IT sector Jenkins automation tool is very famous
and useful. So, I think everyone will be aware about it. Here we are going to
learn What is Jenkins and Its build process in detail? In the end of tutorial we
will bind up some Jenkins basic terminology.
What is Jenkins?
Jenkins is a framework that is use to achieve CI/CD ( Continuous
Integration/Continuous Deployment) in IT infra.
If anyone ask about definition, then this is enough. But if anyone want to know
what logic are working behind Jenkins tool. Then we have to explain Jenkins
tool in details. Let’s first understand software build process means what
happen when our developer write a code?
Software Build Process
I think we all are DevOps engineers. So, we should aware first how a software
or application become ready. What happened in the background when
developers are working on the application? What is the build process? These
are the common questionthat should bein mind ofevery DevOpsengineers. So,
without doing clear these questions no benefit of learning Jenkins tool. Let do
it
There are mainly six phages to pass and reach developer code from their
system to production environment. let’s discuss one by one.
code compiling
When developers write their code and submit to concern team. Then concern
team will first compile their code means they will check code is converting
properly into machine understanding language or not. Finally, I want to say
they will check machine is understanding ourcoding properly or not. If there is
any mistake in our code like syntax or spelling then they will inform to
developers. This whole process is called code compiling. To compile code we
can use JDK and GCC etc.
Code review
If code has been compiled properly then our second step is code review . With
the help of code review, we can detect code warning, security vulnerability,
loophole in code etc.
Test cases
3. By test case we can check our program logic like suppose we have written a
program into our code 10 +10 =20. So, when you give input 10 + 10 its output
should be properly 20 instead of 21,25 etc. All such kind oflogic is check in test
case. In the last you can say here condition of our code will be tested. They are
working properly or not.
code coverage
After code testing this is very important step. With the help of this we can
manage our code weightage means If client says to our team write a sum
program 10 + 10 =20 and our team write this program in 150 line but your
result is covered properly in 100 lines then 50 line is waste. Extra line will
increase orcode weightageand execution time. So,to avoid this we will test our
code coverage.means ifour team are writing 100 line in code 95 must work 5%
we can ignore.
Packaging
If you are thinking everything is OK then packaging comes into the scenario
means by this process we are packaging ourcode into .war, .ear.jar etc file like
code.war, code.ear, code.jar etc. If I will explain in simple language we are
zipping our code for deployment.
Deployment
Deployment means Which application server like JBoss, Tomcat we are using
to executeour code.Deployment is not a rocket science we just simply copy our
zip file into root directory of application serverlike in case oftomcat /webapps
root directory depends on application server.
I hope build process has been clear. Now we are going to understand workflow
of Jenkins tool by diagram.
Workflow diagram of Jenkins tool
When developer commit their changes into VCS then webhook trigger will
generate then Jenkins toolcomes in scenario and pull developers changes from
their branch and deploy by using all above described phases.
4. [Click & Read:– How to setup docker registry server]
[Click & Read:– Docker container commands for beginners]
Why Jenkins tool in our infra?
Let supposeyourdevelopmentteam making 100 commitsin day and saysmake
the build and deploy it on application server. Now let suppose your code is not
building properly and getting fail . So now there is big problem in front of
developer they have to check their all changes from starting to end. So, this is
waste oftime and manpower.If their codewas deployed on every commit, then
there was easy to track issues.But at every commit manually deploymentis not
possible. Because let suppose developer is making 500 commits in a day then.
So, we need to automate our task to track issue on every commit. That
why Jenkins tool comes in scenario when developer commit their code it will
automatically deploy code and send the fails or pass report to developer on
every commit.
What does Jenkins tool?
If you want to understand what Jenkins does,then let take a scenario developer
are making continuous changes into the code they are only focused on their
commit or changes . In the backend our Jenkins or you can say CI/CD tools is
configured what he does ? When developer will commit their code into VCS
system like GIT,SVN etc. Then Jenkins frequently will do code compile, code
review, testing, code coverage, packaging and deploying in backend and
5. sending fail pass report to developer. Before Jenkins all these tasks we are
doing manually.
What is CI/CD tools?
Continuous integration/Continuous deployment is the hole process of code
building by which we can compile, code review, testing, code coverage,
packaging and deployment and if in-between ourcode is getting fail, we will get
continuous mail.
What is Jenkins tool in details?
I think now you will understand better what is Jenkins?
In single line if I will explain what is Jenkins then this is only a framework with
the help of this framework we can achieve CI/CD by using plugins. Jenkins
cannot replace any technology like Maven, pmd/SonarQube ,Junit, sure-fire
cobertura there are running in the backend in form of plugins we have just
integrated these technologies with Jenkins in form of plugins. So, Jenkins is just
only a framework.
Jenkins master : Jenkins master means from where you are managing your
complete administrator like SMTP integration , Git integration Project
management,Usermanagement etc. Mean from master we will manageJenkins
console.
Jenkins Slave : Slave is used to provide add on hardware to a specific job.
Case when we required Jenkins slave
Case 1 : If we cannot extend masterhardware.
Case 2 : If we are running multiple project at a time that increase build time
creation then we can use slave concept
Case 3 : Where you are not willing to vertical scaling then you can do
horizontal scaling of master.
Jenkins Project : Project is a set of interaction like which stage of code you
want to build like compiling,code review, testing,code coverage,packaging etc.
Jenkins Plugins : Withoutplugin Jenkinsis nothingmeans without plugin it’s
like an empty box. Only with the help of plugin we can perform all task like
integration and complete build process.
Conclusion
6. I think you have understood very well concept of Jenkins tool and it use case in
ourdaily life. So before working on Jenkins we shouldknow how Jenkinstool is
working. So, I have tried my best still if anyone have any query write me in
comment box. I will try my best to resolve them.
Interview question related to Jenkins tool
Q) What is Jenkins?
Q) Which one version you are using in your infra?
Q) What is default port of Jenkins?
Q) Can Jenkins test java project ?
Ans — Jenkins cannot test java project. Because Jenkins is just a framework. If
you want to testing java code. you have to installed plugins according to your
requirement. So Jenkins capability is depends on which technology you have
integrated with Jenkins in from of plugins.
Q) What are the daily routine task of Jenkins tool?
Jenkins complete integration like
Plugin installation
Integration with git
SMTP integration
Assign user roles
Make new project
Integrate with tomcat/JBoss
Update plugin if required.
Q) What is preferred hardware requirement of Jenkins?
In Production it is preferred : 16 GB RAM, 2 Dual core CPU, JDK
But simply you can say also It’s dependson how many projects you are building
at a time.