Jenkins Interview Questions And Answers

jenkins interview questions and answers   Top 14 Jenkins Interview Questions And Answers

1) What is Jenkins?

Jenkin is the most popular and powerful open source tool that allows continuous integration and continuous delivery of projects, regardless of the platform you are working on. It can integrated with a number of testing and deployment technologies.

2) What is Continuous Integration in Jenkins?

Continuous Integration(CI) in Jenkins is a development practice that requires developers to integrate code into a shared repository at regular intervals. This concept was meant to remove the problem of finding later occurrence of issues in the build lifecycle. CI requires the developers to have frequent builds. The common practice is that whenever a code commit occurs, a build should be triggered.

3) What are the different features of Jenkins?

Jenkins has following features:
● Jenkins is an open source which is free of cost.
● It has easy installation on various operating systems.
● Jenkins provides build Pipeline Support.
● It is workflow Plugin.
● Test harness built around JUnit.
● Easy upgrades.
● Rapid release cycle.
● Easy configuration setup.
● Extensible with the use of third-party plugins.

4) What are the advantages of Jenkins?

Following are the advantages of Jenkins:
● Build failures are cached during the integration stage.
● Jenkins notifies the developers about build report status using LDAP (Lightweight Directory Access Protocol) mail server.
● Easy integration with GitHub, Maven and other tools.
● Easy bug tracking.
● Automatic changes get updated in the build report with notification.
● Maven release project is automated with simple steps.
● Supports Continuous Integration in agile development and test-driven development.

5) What is the difference between Hudson and Jenkins?

Hudson was the former name of Jenkins, after going through several issues the name was changed to Jenkins. So there is no difference between the two.

6) What is the default scripting language of Jenkins?

Groovy is the default scripting language that is being used in development.

7) What is Jenkinsfile?

Jenkinsfile is the text file where all the definitions of pipelines are defined. It is being checked in the source control repository.

8) What are Scripted Pipelines in Jenkins?

Scripted Pipeline follows Groovy:

Node {
In the above syntax, the node is a part of the Jenkins distributed mode architecture, where there are two types of node Master which handle all the tasks in the development environment and the Agent is being used to handle multiple tasks individually.

9) What are Triggers in Jenkins?

In Jenkins triggers defines the way in which the pipeline should be executed frequently.

10) Which are the different triggers in Jenkins?

PollSCM, Cron, etc are the currently available Triggers in Jenkins.

11) In Jenkins what is Agent Directive?

In Jenkins the Agent is the section that specifies the execution point for the entire pipeline or any specific stage in the pipeline. This section is being specified at the top-level inside the pipeline block.

12) What is Post in Jenkins?

It is a section that have several additional steps which executes after the completion of the pipeline. The execution of all these steps within the condition block depends upon the completion status of the pipeline.

13) What are the Parameters in Jenkins?

Parameters are defined at the top-level of the pipeline or inside an individual stage directive. These are supported by Agent section and are used to support various use-cases pipelines.

14) How to make sure that project build does not break in Jenkins?

Following steps need to be followed:
● Clean and successful installation of Jenkins on your local machine with all unit tests execution.
● All code changes should be reflected successfully.
● Check for repository synchronization and make sure that all the differences or changes related to config and other settings are saved in the repository.