0% found this document useful (0 votes)
175 views

PDF Jenkins Interview Questions Amp Answers

This document contains interview questions and answers related to Jenkins. It discusses concepts like continuous integration (CI), build processes, plugins, and how to install, configure, and manage Jenkins. Some key points covered are: - CI involves integrating code changes daily to identify issues early. Jenkins is a popular CI tool that automates building, testing, and deploying code changes. - The Jenkins process involves developers committing code to a version control system (VCS) like SVN. Jenkins polls the VCS, runs builds and tests using scripts, and provides feedback to developers. - Common plugins are used for source control integration, testing, and notifications. Jenkins is installed on Tomcat and managed through its web interface and

Uploaded by

Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
175 views

PDF Jenkins Interview Questions Amp Answers

This document contains interview questions and answers related to Jenkins. It discusses concepts like continuous integration (CI), build processes, plugins, and how to install, configure, and manage Jenkins. Some key points covered are: - CI involves integrating code changes daily to identify issues early. Jenkins is a popular CI tool that automates building, testing, and deploying code changes. - The Jenkins process involves developers committing code to a version control system (VCS) like SVN. Jenkins polls the VCS, runs builds and tests using scripts, and provides feedback to developers. - Common plugins are used for source control integration, testing, and notifications. Jenkins is installed on Tomcat and managed through its web interface and

Uploaded by

Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Mithun Reddy Lacchannagari Interview Questions

+919980923226

JenkinS InterVieW QueStiOnS

What do mean by Build? 1


Build is nothing but compiling of sources in to distributed artifacts. So developers
will be writing the source code...and it needs to be compiled and packaged so then
it can be distributed to the customers or users for using it..... So this build might
be
happening so after development....it can happen during development or it can
happen in a periodic basis like every week or every month...

What is CI? 2
CI is nothing but a software development practise where members of each
team integrate their work daily by integrating their work daily, they can test
it every
day and it reduces the problems and it can identify the problems earlier and
they can fix it earlier...then we can make product more stable That is the
main use of
CI.....If we start the building at the end of the project we will identify so many
issues, those are integration issues because code will be developed by the
multiple developers.....if we start integrating them daily so you identify issues
earlier and we can fix them earlier....

Sdourtihnagtroeuleracsoedteimqeu.a..l.i.ty will get increased and will not see any


integration issues

How CI works? How day to day people work? 3


For any CI there will be a−−−−−VCS where it keeps tracking of source code, and Build
script where we have give instructions to build, to deploy, and to test and CI server
to manage all these things , and developers who is writing/modifying the source
code.......

Developers do they work and send changes to their VCS repository....thats
their job

And CI server will continuously checks is their any change to VCS

If their is a change pull that change .....& calls the build script...........build it,
deploy it and test it....and gives the feedback

Developers will made a change ............

Feedback is generated by CI server about the quality of code
change.........some thing bad he has done its available for him
right
away.....that is why continuous integration is so powerful....

It integrates VCS ......It integrates build and deployment systems.....and
consolidate whole things & give a feedback on the quality of change...........it
brings all systems together.....

What are the Prerequisites for CI 4


we should have a project with your buildscript it might be written in ant or it can
be a maven too...
http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

And we have to maintain a source repository...like svn, git, tfs etc...........

Which tool do you use for CI? And how it works? 5


We use lenkins as a CI tool.....and coming to work process............multiple
developers are working on the project.....svn is the source repository which
keeps the versioning of our files and maintaining our files data and jenkins is
the CI
system which pole the source repository and starts the build...so the build script
is provided in AnT. so, it will execute the build script and it will generates the
artifact......
Artifact is nothing but the output of our source code...So after compiling and
packaging our source code the artifact will be generated...
So once the artifact is generated from the given build script....and we deploy the
artifacts in to the tomcat server and then QA guys will go for testing and validate
it...and if there are any automated tests they can run and reports will be
published from the jenkins dashboard or CI system dashboard So, this is the
process how
jenkins works.....

What is the difference between SVN and lenkins? 6


Svn is just keep track of our source code versioning............
But lenkins will manage the running builds and will manage your builds. .so, once
we configure the project with jenkins ....it will takecare of building it whenever
changes happen in your source code and publish if any build failure or if there are
any issues with the test cases...
So, as multiple developers working on the same source code better to integrate
daily so that we can identify any dependency issues or any issues earliest.........

What do you mean by running builds? 7

What kind of plugins you have installed and used? 8


Ans :subversion/git , cobetura, clone, email, shelve, junit, thin backup..these are
the plugins I have installed .......

In the jenkins Dashboard left side panel there is option manage jenkins −−−> click on
manage plugin −−−> go to available option −−−−> We can search for the plugin what
we have to integrate with jenkins for ex: git we just type the git plugin in the filter
option and it produces the git related plugins then we have to select it click on
Install with or without restart.....

Basically Git plugin have the dependencies also one is git client plugin and scm API
plugin..

After installation it changes pending state to success state....

And then once restart the jenkins and now we can configure the job....

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

Have u create jenkins job from the scratch 9


Yes.....Before creating a job i will do some system configuration bcz i have to
configure the jdk subversion ant version details and path of that tools in the
related sessions and i also configured the E−mail notification session and so on and i
will
also install if any new plugins needed and after that i will create the job and i
configured that job session and i trigger a build and i view console output and i
send the status of the builds to the dev team.....

All the configurations of jenkins server will store in config.xml file

Have u setup jenkins? How did you install jenkins? 10


First install jenkins and go to jenkins installed folder and copy jenkins war file and
paste it in tomcat webapps....

Next type :
$ lava −jar jenkins.war
$ lenkins.rpm

And now go to tomcat path −−−−>ls


$ cd bin
$ chmod 777 catalina.sh
$ sh startup.sh

Now open browser type the default http://localhost:8080 : then it will shows
tomcat homepage
If we want to open jenkins homepage: type http://localhost:8080/jenkins.......Thats
http://localhost:8080/jenkins
it....

How do you start jenkins as a service? 11


Install yum−−−−>install jenkins.war

How do you start / stop /restart a jenkins 12


First we have go tomcat installed path −−−> bin −−−−>
To start jenkins type: $ sh startup.sh
To stop jenkins type: $ sh shutdown.sh
And to restart type: stop the server and then start again...
If we want to know whether jenkins server is in on or not: just type: ps −ef | grep
tomcat

How do you change your port no for your jenkins and what is the default port? 13
Ans: go to the tomcat installation folder and from there go to conf folder and open
service.xml there change the port (connector) to 8081 or any other port no from

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

8080...and go to bin and double click on service.bat and click on sh startup.sh/


startup.bat and run jenkins on new port number...

Where do you find default jenkins logs? 14


Ans: system log will captures the output from java.util.logging output related to
jenkins..
select the "system log" from the "Manage lenkins" page:
From there, you can create a custom log recorder, which helps you group relevant
logs together while filtering out the noise.

A screen will open like log recorders−−−−−−> All jenkins logs−−−>click on add new
recorder−−−−> we have to choose/enter the name that makes sense to us−−−−−−>click
on ok
−−−> and then we have to configure the logger details ex:hudson.plugin.disk_usage
and select the log level to find and click on add....and click on save....

Once the set up is complete, Jenkins will start collecting data. The collected logs are

available from the web UI.

From <https://wiki.jenkins−ci.org/display/lENKINS/Logging>

What are the chanllenges who have faced when setting up jenkins 15

How do find jenkins server is running or not? 16


Ans: go to console −−−>ps −ef | grep tomcat−−−−−>

then it will shows like:


[geetha@localhost Desktop]$ ps −ef | grep tomcat
geetha 3075 1 0 lul09 ? 00:01:48
/home/geetha/softwares/ant_jdk/jdk1.7.0_51/bin/java −
Djava.util.logging.config.file=/home/geetha/softwares/apache−tomcat−
8.0.20/conf/logging.properties −
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager −
Djava.endorsed.dirs=/home/geetha/softwares/apache−tomcat−8.0.20/endorsed −
classpath /home/geetha/softwares/apache−tomcat−
8.0.20/bin/bootstrap.jar:/home/geetha/softwares/apache−tomcat−
8.0.20/bin/tomcat−juli.jar −Dcatalina.base=/home/geetha/softwares/apache−
tomcat−8.0.20 −Dcatalina.home=/home/geetha/softwares/apache−tomcat−8.0.20 −
Djava.io.tmpdir=/home/geetha/softwares/apache−tomcat−8.0.20/temp
org.apache.catalina.startup.Bootstrap start
geetha 3816 3780 0 05:04 pts/7 00:00:00 grep tomcat

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

[geetha@localhost Desktop]$

How do you stop jenkins when some build jobs are in progress 17

To restart lenkins manually, you can use either of the following commands:
There is one op+ion in jenkins; i.e., "preparing for shu+down" if any jobs
are running in jenkins firs+ i+ will comple+e +he process and +hen i+ will
shu+down jenkins....
(Or)
(jenkins_url)/safeRes+ar+ - Allows all running jobs +o comple+e.
New jobs will remain in +he queue +o run af+er +he res+ar+ is
comple+e.

(jenkins_url)/res+ar+ - Forces a res+ar+ wi+hou+ wai+ing for builds


+o comple+e.

How do you migrate jenkins from one machine to anotherú 18

1 In st a l l th e fr e s h je n ki n s i n th e n e w s e rv e r
2 . B e s u r e o ld a n d n e w j e n k in s ar e s to p p e d
3. Archeive all the content of the jenkins_home(.jenkins) of the old
jenkins instance
4. Extract the old jenkins in to the new jenkins_home directory
5. Launch the new jenkins
6. Do not forget to change documentation / links to your instance of your
new jenkins

Where does jenkins store its configuration data 19


Ans: On jenkins home directory and there are some common folders we found like
.jenkins, jobs and plugins folders etc . In jobs folder we found all the
configuration data will be stored and in jobs folder the 3 important subfolders
are builds,
workspace folders and config .xml file....

What is the default jenkins home directory?How do you change it? 20


Dot jenkins is the default home directory....To change the jenkins home directory
go to i:
vi. bash rc export jenkins_home=path....

Where does jenkins store global configuration and job related configuration 21

lenkins stores the configuration for each job within an enonymous directory
in jobs/. The job configuration file is config.xml, the builds are stored in builds/,
and the working directory is workspace/.

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

Or

The lENKINS_HOME directory is laid out like this:


1. $lENKINS_HOME contains system level configuration files such as the lenkins
master config.xml and the credentials.xml

2. $lENKINS_HOME/jobs contains all the individual job configuration and build data
in a separate subdirectory for each job, e.g. for the job "myjob" you'll have
$lENKINS_HOME/jobs/myjob/config.xml plus other files that store the data for
individual builds.
Or

lob related configuration will be stored in .jenkins−−−−>jobs


Global configurations will store in .jenkins−−−−−>config.xml

How do you restore the system configuration and all the jobs?

−−−−−>So if you want to restore the system configuration and all the jobs without
the build history, you'll need to copy:
$lENKINS_HOME/.xml $JENKINS_HOWE/jobs/*/config.xml (using Antglob notation, **
denotes all subdirectories under $lENKINS_HOME/jobs)

−−−−>You'll also need $lENKINS_HOME/plugins/* if you installed any extra plugins.


If you want to restore all the build history, copy $lENKINS_HOME/jobs/* instead of just
the config.xml files.

From <http://stackoverflow.com/questions/23795752/how−to−restore−jobs−in−jenkins?rq=1>

If you want to change jdk for all your 1000 jenkins jobs or any other configurations? 22
How do you do it?
Go to masters nodes and change theirs lables

How many jobs files in jenkins 23


There are four types of jobs we can create....
1. Free style project
2. Maven project
3. Build multi configuration project
4. External jobs
Mostly we will create a job iin free style projects....bcz it support all kinds of tools..

i. How do you create jenkins job ii) How did you setup build and deployment using 24
jenkins for your project?

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

Ans: i) in jenkins dashboard−−−> in left side panel −−−−> there will be an option
called "new job" click on it and create the job.....
Ii) go to manage jenkins −−−−> configure system−−−−> there we have to configure
svn path and ant path and save it and now go to project and click on configure
and there we invoke ant for build and for deployment we copy the artifacts in to
tomcat server...

dHow do you or how many builds u store for your project 25


Ans : It depends......But max 10builds

What is parameterised builds 26


Go to project −−−−−> go to configure page −−−−> there we will see the option "this
build is parameterised" check it that box−−−> we have to click on dropdown list "add
parameter"−−−−> here we have different modules.based on our need we will
select one....i.e., boolean, cvs, parameter etc....

How do you run different jenkins jobs with different jdk's? 27


We will give different jdk versions in system configuration page and then we run
jobs for different versions...

What is cron tab and cron scm 28


In jenkins −−> go to project configuration page and there the option "Build
periodically" that is the chrone tab. .whether there is change in scm or not it will
go
and build periodically...

Poll scm : If there is any change in svn it will automatically build...if there is no
changes done in vcs then it will remains constant without doing any kind of build....

Can u use jenkins for non java applications 29


Ans: Yes, but jenkins is mostly used for java applications

1. HGoo wto dthoeyCoouncfiognurfeigGurloebsael cSuerciutyrituyssecrredeanta base for


your jenkins 30
2. and choose "enable security"
3. Select "Jenkins's own user database" as the security realm
4. Place a check mark next to "Allow users to sign up"
5. Select "Matrix-based security" as the authorization
6. Give anonymous user the read access
7. In the text box below the table, type in your user name (you'd be creating this later) and
click "add"
8. Give yourself a full access by checking the entire row for your user name
9. Scroll all the way to the bottom, click "save"
At this point, you'll be taken back to the top page, and Jenkins is successfully secured.
Now you need to create an user account for yourself.
1.
Click "login" link at the top right portion of the page
http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

2.
Choose "create an account"
3.
Use the user name you've used in the above step, and fill in the rest.
If everything works smoothly, you are now logged on as yourself with full permissions.

Are you using LDAP for build organistation? 31


No but i have an idea on LDAP....

If Jenkins is running on a Windows server then it is better to install the Active Directory
plugin.
On a Linux host you have an option to either use the Active Directory plugin or an LDAP
based authentication. To configure the LDAP to work with Active Directory, provide the
following:

Server mydomaincontroller.mycompnay.com:389

Root DN dc=mycompnay,dc=com

User Search sAMAccountName=(0}


Filter

Manager DN cn=mymanageruser,ou=users,ou=na,ou=mycompany,dc=mycompany,dc=com

Manager *****
Password

Note that the correct Manager DN value can vary greatly depending on your Active
Directory set up.

What is matrix based security 32


Ans: Actually this comes under security purpose means granting access
permissions to specific users and groups for specific sections before that we also
have to provide authentication access also for that we will go for
manage jenkins−−−and go for configure global security page−−−−−and there will be
option called enable security Once we check it ..it will show us page like security
realm and authorization section. .in security realm we will give the
authentication
permissions like −−−hudson own user data base....and
Allow users to sign up options....
Once authentication provides to users we will also provide some
authorization permissions and in authorization section we always use
matrix based
security....means it looks like table we have to select the checkbox for specific
sections...there is a section like−−−−−> overall permissions like(
admin/read/runscripts/upload plugins/configure update sites and proxy settiings)
and some more permissions like slave(configure to existing slaves/delete /create
new slaves/Disconnect slaves/connect slaves) ,
http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

job(create/workspace/build/delete/configure/read/cancel/ , run(delete/update),
view(create/delete/ configure /read), scm(tag)

How do you trigger jenkins build as soon as there is a change in vcs? 33

Through poll scm

How do you install plugins? 34


The simplest way is by going to manage jenkins screen and clicking Omimdc \audiis and go
to the Mvmiamhac tab. You'll find the plugin you'd like to install, select the checkbox, and
then either attempt to Eistmaa wit`fut rcstmrt or Jfwiafmj ifw mij iistmaa mgtcr rcstmrt.
The web interface will then download *.hpi files from here. If you Eistmaa wit`fut rcstmrt
the interface will show you progress and provide the results of the install.
Sometimes when you install, you will notice that the list of available plugins is empty. If
that is the case, from Mjvmikcj tab on the Omimdc \audiis page, click on K`ckb
ifw(button available in the bottom right of the page) to forcefully check for new updates.
Once that is done, you should see the list of plugins.

Do you take backup of jenkins if yes how? 35


Yes we take backup of jenkins daily. . .for that we have to copy .jenkins folder to
backup....this we will set in crone tab....
Do you take backup only job related configurations other than workspace 36
Ans: In jenkins home −−−> .jenkins−−−−−> jobs−−−−−> builds and config.xml

We will configure this like:


$ cd .jenkins
$ ls
$ cd jobs
$ ls
$ builds config.xml

How do you manually start the build / trigger the build? 37


Ans: In project dashboard−−−−−> leftpanel−−−−−> we want to click on the option called
"build now"

What is reload configuration in your disk 38


Discard all the loaded data in memory and reload everything from the file system

How do you install jenkin pluggin manually? 39


Save the downloaded *.hpi/*.jpi file into the $lENKINS_HOME/plugins directory. You will
then need to restart lenkins (many containers let you do this without restarting
the container)

How do start the jenkins in command line interface? 40

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

lenkins has a built−in command line client that allows you to access lenkins from a
script or from your shell. This is convenient for automation of routine tasks, bulk
updates, trouble diagnosis, and so on.

Obtaining CLI
Jenkins CLI is distributed inside jenkins.war as a jar file. See http://yourserver.com/cli for
where to download the CLI jar file. In theory, the CLI jar is dependent on the version of
Jenkins, but in practice, we expect to be able to retain compatibility between different
versions of Jenkins.

Running CLI
The general syntax is as follows (the design is similar to tools like svn/git):
java -jar jenkins-cli.jar

How do you setup distributed builds 41


lenkins supports the "master/slave" mode, where the workload of building projects
are delegated to multiple "slave" nodes, allowing a single lenkins installation to
host a large number of projects, or to provide different environments needed for
builds/tests. This document describes this mode and how to use it.

How do you add a node to your master or how to create nodes? 42


Ans: go to jenkins dashboard−−−−>manage jenkins−−−−−>and then click on nodes−−−−>
and now we can add a new node.

What r the different ways to shutdown your jenkins 43


Ans: one is : sh shutdown.sh
Another is : go to manage jenkins there we find one option called "preparing for
shutdown"

Have you ever configure junit, cobertura, sonar for your builds? 44
Ans: Based on plugins we will configure this...first we have to install plugin and
then we configure in manage jenkins−−−>system configure .....and we it in our
project

Do you know how to integrate jeera with your jenkins 45


Yes,

What is pipeline? 46
Calling a different jobs based on request

What kind of issues you have faced with your jenkins so far? 47

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

How much u rate in jenkins? 48


Ans: 4 out of 5

What are the other ci tools you have to used? 49


Hudson.....but both jenkins and hudson is same.....i worked on jenkins....

What is CI and CD 50

How do you setup email 51


go to jenkins dashboard---> in the Ieft paneI cIick on manage jenkins---> configure system--
-> there we wiII configure the emaiI notification detaiIs Iike smtp server/
username/pswd/ etc...and then cIick on save....

Have you used advanced email pluggin? 52


No, I worked on editable email plugin

How do you configure your jenkins server? 53

What do you know about advanced builds and distributed builds 54

How do you maintain jenkins 55

If jenkins becomes slow what actions do you take? How do you approach 56
we have to check memory and add more ram if required and we check for any
unused jobs we will take backup and delete that job and we cleanup an un−used
pluggins....wheather memory is over then it will shows out of memory error...

How do you trigger buiIds on remote servers [ master-sIave concept] 57

what is unit tests and what is code-coverage 58

Where do you give InstaIIation detaiIs in Jenkins 59


Ans: go to jenkins dashboard---> in the Ieft paneI cIick on manage jenkins----> configure
system---> there we wiII configure ther instaIIation detaiIs of ant , svn, in reIated sessions....

How do you change base directory of checkout in Jenkins 60

How do run Jenkins as a service ? [ Windows and Linux ] 61

What is Scrum way of working or what is the deveIopment methodoIogy you use 62

We use AgiIe methodoIogy in my current organisation.....

There wiII be product backIog----> puII some requirements/stories in to a sprint backIog

and we wiII pIan and divide the requirements......Now Every one have there own
responsibiIty. . .by the end of the day there wiII be a standup meeting there we wiII teII the
status of job done..furture what jobs we have to do......before demo/review session

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

there wiII be a restrospective meeting with our scrum master /project manager personaIIy
reg the status of requirements......And then
at the end of the sprint they have the review / demo session....(its very imp qa wiII tests and
produces demo in front of po if he approves ok fine.....this process wiII be iterated tiII we
reach the goaI of project....

How do you do troubIeshooting of buiId faiIures ? 63


Ans : common issues i faced was:

1. When we didnot instaII dependency pIugin then it wiII show the error : BuiId faiIed
:Required goaI not found
TS: instaII the dependency pIugin and configure it and then we trigger a buiId then
buiId wiII be successfuI.
2. Missing artifact: buiId faiIed ....it wiII show the error Iike faiIed to resoIve artifact...one
required artifact is missing...
such type of issue wiII come whiIe we removed artifact from the cache(it happens every few
months)--->
TS: rebuiId that versiion of that moduIe to get it reinstaIIed.
3. ....it's not a fiIe : The error shows Iike : buiId error: faiIed to create assembIy
It happens when the
when a module is build but one of its dependencies is built at the same time
(so its jar is already 'deleted') −> waiting until the dependency build had
finished, then re−triggering the module build fixed it
4. Invalid java version:
It happens when we didnt configure correct version we are usually using
then this error willl occur
TS:
Each hudson job has a jdk to be used − if this is e.g. set to 1.5 but the build
would actually require 1.6 you'll see the above error −> get the job properly
configured

5. Mail notification failure: if any password changes this type of issue


will come....

If the issue is related to me....i will resolve it by my side and if not i will send mail
attaching the printscreen to perticular team / person.....

How have you used Jenkins in your current environment ? 64


I have used jenkins from the scratch.....instaIIing and configuring jenkins and creating and
configuring new jobs....trigger a buiId automaticcaIyy....instaIIing pIugins.....providing
accesss permissions to the users and groups.....taking backup.......moving jenkins job from
one server to anotherr ....and many more i have used jenkins in our current environment.....

How do you manage buiIds 65


By −−−−−

Running builds

Viewing changes

Download artifacts from dash board

Build trends−−−(means what are the builds failed / succedded)

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226


Tagging builds −−(it is the build ready to release...we will create the tag)

How do you manage plugins? 66


By−−−−−

Installing plugins

Updating plugins

Uninstalling plugins

How do you manage USER authentication and authorization? 67


By−−−−−−

Creating users

Authenticating users with LDAP

Setting permissions to user actions

Enabling project level security
Authentication is nothing but providing access to the users and setting
permissions to the user actions.........It has a project level security
also....means you can do certain actions on project or u can not do certain
actions....so we can configure a project level authorization....

How do u assign permissions to users in jenkins? 68


Once authentication provides to users we also provide some authorization
permissions....it is in manage jenkins−−−and go for configure global security page−−−−

and there will be option called enable security Once we check it ..it willl show
us page like security realm and authorization section in security realm we will
give
the authentication permissions like −−−hudson own user data base....and
Allow users to sign up options.......and in authorization section we always use

m a t ri x b a s d
s p e c i f ic u s er s
s e c ur i t y. .. .b c z it a ll o w s y o u t o g r a nt o n ly sp e c if ic
a n d g r o u p s. . ..i m e a n s p e c ifi c p e r m is s io ns m e a n s
p e rm is s io n s t o
li ke th e r e w i ll be
a overall permissions like( admin/read/runscripts/upload plugins/configure
update sites and proxy settiings) and some more permissions like slave(configure
to existing slaves/delete /create new slaves/Disconnect slaves/connect slaves) ,
job(create/workspace/build/delete/configure/read/cancel/ , run(delete/update),
view(create/delete/ configure /read), scm(tag)

How do you see the process id and wheather jenkins server is running or not 69

ps -ef | grep jenkins


sudo kill -kill <pid>
http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

What are the bestpractise do u follow in jenkins 70


Always secure lenkins.

This best practice is around authenticating users and enforcing access control on a Jenkins
instance

In the default configuration, lenkins doeîs not perform any security checks. This means any person
accessing the website can configure lenkins and jobs, and perform builds. While this configuration is
normally acceptable for intranet use and quick setup, it introduces high security risks, like someone
accidentally deleting your build jobs, reconfiguring your job to run every minute, kicking off too
many builds at the same time, reconfiguring your build instance, etc.

Backup lenkins Home regularly.

'Nuff said.

Use "file fingerprinting" to manage dependencies.

When you have interdependent projects on lenkins, it often becomes hard to keep track of which
version of this is used by which version of that. lenkins supports "file fingerprinting" to simplify this,
so make best use of it.

The most reliable builds will be clean builds, which are built fully from Source Code Control.

To ensure a build can be reproducible, the build must be a clean build, which is built
fully from Source Code Control. This practice also implies that all code including third-
party jars, build scripts, release notes, etc. must be checked into Source Code
Control.

Integrate tightly with your issue tracking system, like lIRA or bugzilla, to reduce the
need for maintaining a Change Log

The integration helps to track changes as they are made, including build status, what

build hr eas u bl t se ea n dp ea rf toi framc et sd. for this requirement or defects, and the link to
the actual

Integrate tightly with a repository browsing tool like FishEye if you are using
Subversion as source code management tool

Repository browsing provides a quick update on what happens on a Subversion


repository. It also provides a graphical diff on what changes have been made from the
previous build.

Always configure your job to generate trend reports and automated testing when
running a lava build

Trends helps project managers and developers quickly visualize current project
progress status. Moreover, unit testing is often not enough to provide confidence that

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

the delivered software complies to the desired quality. The more you test the
software, the better the delivered software complies to the desired quality.

Set up lenkins on the partition that has the most free disk−space

Jenkins needs some disk space to perform builds and keep archives. All the settings,
build logs, artifact archives are stored under the JENKINS_HOME directory. Simply

athrechcivoenttehnistsdoirfetchteorJyEtNo KmINakSe_aHObaMcEk udpir.eSctiomryilafrloym,


reasbtoarcinkgutph.e data is just replacing

Archive unused jobs before removing them.

All unused jobs should be archived so they can be resurrected if the need arises.
See Administering Jenkins for ways to do this.

Setup a different job/project for each maintenance or development branch you


create

One of advantages of using CI tools is to detect problems early in the development


lifecycle. Setting up a different job/project for each branch you create will help to
maximize the benefit of detecting problems early as part of supporting parallel
development efforts and reducing risk.

Allocate a different port for parallel project builds and avoid scheduling all jobs to
start at the same time

Multiple jobs running at the same time often cause collisions. Try to avoid scheduling
all jobs to start at the same time. Allocate a different port for parallel project builds to
avoid build collisions.

Set up email notifications mapping to ALL developers in the project, so that


everyone on the team has his pulse on the project's current status.

Configure each person on the people list with his or her correct email address and
what role he or she is currently playing.

Take steps to ensure failures are reported as soon as possible.

For example, it may be appropriate to run a limited set of "sniff tests" before the full
suite.

Write jobs for your maintenance tasks, such as cleanup operations to avoid full
disk problems.

Tag, label, or baseline the codebase after the


successful build.

Configure lenkins bootstrapper to update your working copy prior to running the
build goal/target

In larger systems, don't build on the


master.

http://mithuntechnologies.com [email protected]
Mithun Reddy Lacchannagari Interview Questions
+919980923226

You can do this by setting the executor count to zero. Instead, make sure all jobs run
on slaves. This ensures that the jenkins master can scale to support many more jobs,
and it also protects builds from modifying potentially sensitive data on
$JENKINS_HOME accidentally/maliciously.

How do you clone a job in jenkins 71

Clone is one type of plugin ....it is used like recycle bin...when our jenkins is slow
we will keep our old builds in clone. .whenever we want again means we will take
from there....

http://mithuntechnologies.com [email protected]

You might also like