Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

51.

What do you mean by a Jenkins File and what are its advantages?

Answer»

A JENKINS file is a text file that contains the definition of a Jenkins Pipeline and it is generally checked into source control. 

  • AUDIT trail for the Pipeline can be monitored
  • It SERVES as a single source of truth for the Pipeline, which can be viewed and edited by multiple members of the PROJECT.
52.

What do you mean by build pipeline in Jenkins?

Answer»

Creating a chain of jobs in Jenkins is the PROCESS of automatically starting the sequential job after one job is executed SUCCESSFULLY. This approach lets the user build multi-step build PIPELINES or trigger the rebuild of a PROJECT if one of the Project DEPENDENCIES is updated.

53.

What is the use of the Role Based strategy plugin?

Answer»

The role-based strategy plugin allows US to create three different types of roles as describes below,

  • GLOBAL Roles: Some of the roles such as admin, job creator, ANONYMOUS can be created while selecting this option. The user can allow setting Overall, slave, job, and View and SCM permissions on a global BASIS.
  • Project roles: This job is basically to allow the creation of Job and Run permissions on a project basis.
  • Slave roles: This job is only to set node-related permissions.
54.

Elaborate on how to move or copy Jenkins from one server to another?

Answer»

Please follow the below steps,

  • Slide a job from one INSTALLATION of Jenkins to another by COPYING the related job DIRECTORY
  • Make a copy of an already existing job by making a clone of a job directory by a DIFFERENT name
  • Renaming an existing job by renaming a directory.
55.

What are the different ways in which build can be scheduled in Jenkins?

Answer»

The below are the ways of scheduling build in Jenkins

  • Builds can be TRIGGERED by SOURCE code management commits.
  • Builds can be triggered SEQUENTIALLY after completion of other builds.
  • Can be scheduled to RUN at a specified time USING the CRON jobs
  • Manual Build Requests.
56.

How to fix a broken build for your project in Jenkins and how to make sure project build doesn't break in Jenkins at all?

Answer»

The user needs to open the console output for the build and will TRY to see if any file changes that were MISSED during building the PROJECT. If there are no issues on that then a better approach would be clean and update his local WORKSPACE to replicate the problem on their local machine and will try to solve it.

To make sure Jenkins build is not broken at all we need to make sure that we perform a successful clean install on the local machine with all unit tests. Then make sure that all code changes are checked in without any issues. Then synchronize with a repository to make sure that all required config and changes and any DIFFERENCES are checked into the repository.