YuWebdesign



Top Jenkins Interview Questions

By YuwebDesign


Jenkins is an open source tool
with plugin
built for continuous integration purpose.

The core functionality of Jenkins
is to keep a track of version control system
and to initiate and monitor
a build system if changes occur.

It monitors the whole process
and provides reports and notifications to alert.

In software development,
when multiple developers or teams
are working on different segments
of same web application,
we need to perform integration test
by integrating all modules.

In order to do that
an automated process for each piece of code
is performed on daily bases
so that all your code gets tested.

To use Jenkins you require

  1. A source code repository which is accessible,
    e.g., a Git repository
  2. A working build script,
    e.g., a Maven script,
    checked into the repository

Advantage of Jenkins include

  1. At integration stage,
    build failures are cached
  2. Generation of an automatic build report notification
    for each code commit changes
  3. To notify developers
    about build report success or failure,
    it is integrated with LDAP mail server
  4. Achieves
    continuous integration agile development
    and test driven development
  5. With simple steps, maven release project is automated
  6. Easy tracking of bugs
    at early stage in development environment
    as compared to production

  1. Slide a job
    from one installation of Jenkins
    to another
    by copying the related job directory
  2. Make a copy
    of an already existing job
    by making clone of a job directory
    by a different name
  3. Rename an existing job
    by renaming a directory.

To start Jenkins manually, you can use either of the following

  1. (Jenkins_url)/restart:
    Forces a restart without waiting for builds to complete
  2. (Jenkin_url)/safeRestart:
    Allows all running builds to complete

Some of the important plugins in Jenkin includes

  1. Maven 2 project
  2. Amazon EC2
  3. HTML publisher
  4. Copy artifact
  5. Join
  6. Green Balls
  7. Cobertura for code coverage
  8. Blue Ocean

To deploy a custom field of a core plugin, you have to do following things

  1. Stop Jenkins
  2. Copy the custom HPI to $Jenkins_Home/plugins
  3. Delete the previously expanded plugin directory
  4. Make an empty file called .hpi.pinned
  5. Start Jenkins

Jenkins saves

  1. all the settings,
  2. build artifacts
  3. and logs

in its home directory.

To create a back-up of your Jenkins setup,
just copy this directory.

You can also copy a job directory
to clone or replicate a job
or rename the directory.

To clone a Git repository via Jenkins,
you have to enter

  1. e-mail
  2. and user name

for your Jenkins system.

For that, you have to

  1. switch into your job directory
  2. and execute the “git config” command.

To create a project
that is handled via jobs in Jenkins

  1. select New item from the menu,
  2. enter a name for the job
  3. and select free-style job
  4. click OK to create new job in Jenkins
  5. The next page enables you to configure your job.

Jenkins is mainly integrated with two components:

  1. Version Control system like GIT, SVN
  2. And build tools like Apache Maven.

Jenkins can also be integrated
with Configuration Management Tool like Ansible
for Continuous Delivery.


Sources: career.guru99.com


Leave a Reply or Comment

Your email address will not be published. Required fields are marked *