Jenkins Interview Questions And Answers

UPDATED 100+ Jenkins Interview Questions And Answers

Most Commonly Asked Jenkins Interview Questions And Answers

Jenkins Interview Questions And Answers are as follows-

1)What is Jenkins?

Jenkins is an open source tool with plugin built for continuous integration purpose.  The principle 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.

2) Explain what is continuous integration?

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 get tested.

3) What is the requirement for using Jenkins?

To use Jenkins you require

A source code repository which is accessible, for instance, a Git repository

A working build script, e.g., a Maven script, checked into the repository

4) Mention what are the advantages of Jenkins?

Advantage of Jenkins include

At integration stage, build failures are cached

For each code commit changes an automatic build report notification generates

To notify developers about build report success or failure, it is integrated with LDAP mail server

Achieves continuous integration agile development and test driven development

With simple steps, maven release project is automated

Easy tracking of bugs at early stage in development environment than production

5) Explain how you can move or copy Jenkins from one server to another?

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 clone of a job directory by a different name

Renaming an existing job by renaming a directory.

6) Mention what are the commands you can use to start Jenkins manually?

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

(Jenkins_url)/restart: Forces a restart without waiting for builds to complete

(Jenkin_url)/safeRestart: Allows all running builds to complete

7) Mention some of the useful plugins in Jenkin?

Some of the important plugins in Jenkin includes

Maven 2 project

Amazon EC2

HTML publisher

Copy artifact

Join

Green Balls

8) Explain how you can deploy a custom build of a core plugin?

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

Stop Jenkins

Copy the custom HPI to $Jenkins_Home/plugins

Delete the previously expanded plugin directory

Make an empty file called <plugin>.hpi.pinned

Start Jenkins

9) Explain how can create a backup and copy files in Jenkins?

Jenkins saves all the setting, build artifacts 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.

10) Explain how you can clone a Git repository via Jenkins?

To clone a Git repository via Jenkins, you have to enter the e-mail and user name for your Jenkins system.  For that, you have to switch into your job directory and execute the “git config” command.

11) Explain how you can set up Jenkins job?

To create a project that is handled via jobs in Jenkins.  Select New item from the menu, once this done enter a name for the job and select free-style job. Then click OK to create new job in Jenkins.  The next page enables you to configure your job.

12) Mention what are the two components Jenkins is mainly integrated with?

Jenkin is mainly integrated with two components

Version Control system like GIT, SVN

And build tools like Apache Maven.

13) What is the difference between Jenkins and Bamboo?

Parameters Jenkins Bamboo
Open Source Jenkin is open-source Bamboo is not open source
Pricing Logic Jenkin is completely free It charges for the number of build agents required
Operating System Windows, Ubuntu, Red Hat, Mac OS Windows, Linux, Solaris
Browsers Chrome, Firefox, Internet Explorer Firefox, Chrome, Safari, Edge
Plugin Support Yes, It supports a lot of plugins It does not support many plugins as compared to Jenkins
Support Being open-source, it has a lot of support from communities It has less support as compared to Jenkins

 

14) Define the process of Jenkins.

First, a developer commits the code to the source code repository. Meanwhile, the Jenkins server checks the repository at regular intervals for changes.

Soon after a commit occurs, the Jenkins server detects the changes that have occurred in the source code repository. Jenkins will pull those changes and will start preparing a new build.

If the build fails, then the concerned team will be notified.

If the build is successful, then Jenkins deploys the build in the test server.

After testing, Jenkins generates feedback and then notifies the developers about the build and test results.

It will continue to check the source code repository for changes made in the source code and the whole process keeps on repeating.

15) What are the benefits of using Jenkins?

I will suggest you include the following benefits of Jenkins if you can recall any other benefit apart from the below-mentioned points you can include that as well.

At the integration stage, you can cache build failures.

For each change in the source code, you generate an automatic build report notification.

To notify developers about build report success or failure, Jenkins integrates with the LDAP mail server.

Achieves continuous integration agile development and test driven development.

With simple steps, you can automate the maven release project.

Easy tracking of bugs at an early stage in a development environment than production.

16) What are the pre-requisites for using Jenkins?

The answer to this is pretty straightforward. To use Jenkins you require:

A source code repository which is accessible, for instance, a Git repository.

A working build script, e.g., a Maven script, checked into the repository.

17) What is the relation between Hudson and Jenkins?

You can just say Hudson was the earlier name and version of current Jenkins. After some issues, they renamed the project from Hudson to Jenkins.

18) Mention some of the useful plugins in Jenkins

Below I have mentioned some important Plugins:

Maven 2 project

Git

Amazon EC2

HTML publisher

Copy artifact

Join

Green Balls

19) How do you install Jenkins?

To install Jenkins, you just need to follow these five steps:

Install Java Version 8 – Jenkins is a Java based application, hence Java is a must.

Install Apache Tomcat Version 9 – Tomcat is essential to deploy Jenkins war file.

Download Jenkins war File – This war is must to install Jenkins.

Deploy Jenkins war File – You deploy Jenkins war file using Tomcat to run Jenkins.

Install Suggested Plugins – Install a list of plugins suggested by Jenkins.

Once the installation is complete, you will be able to see the Jenkins dashboard.

20) What are the two components that you can integrate Jenkins with?

According to me, the integration of Jenkins is possible with the following:

Version Control system like GIT, SVN.

Build tools like Apache Maven.

If you have anything else in your mind then mention that as well but make sure you include the above two components in your answer.

21) What is Maven? What is the benefit of integrating Maven with Jenkins?

Maven is a build management tool. It uses a simple pom.xml to configure all the dependencies needed to build, test and run the code. Maven manages the full lifecycle of a test project. Once integrated with Jenkins, the maven Webdriver will build the project and execute all tests efficiently.

22) what are the commands you can use to start Jenkins manually.

For this answer I will suggest you go with the below-mentioned flow:
To start Jenkins manually open Console/Command line, then go to your Jenkins installation directory. Over there you can use the below commands:

Start Jenkins: jenkins.exe start
Stop Jenkins: jenkins.exe stop
Restart Jenkins: jenkins.exe restart

23) Which SCM tools Jenkins supports?

Here are some of the Source Code Management tools supported by Jenkins:

AccuRev

CVS

Subversion

Git

Mercurial

Perforce

Clearcase

RTC

24) How will you define Post in Jenkins?

Post is a section that contains several additional steps that might execute after the completion of the pipeline. The execution of all the steps within the condition block depends upon the completion status of the pipeline. The condition block includes the following conditions – changed success, always, failure, unstable and aborted.

25) What are Parameters in Jenkins?

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

26) What is Groovy?

Groovy from Apache is a language designed for the Java platform. It is the native scripting language for Jenkins. Groovy-based plugins enhance Jenkins with great interfaces and build reports that are of dynamic and consistent nature.

27) How Can You Clone A Git Repository Via Jenkins?

If you want to clone a Git repository via Jenkins, you have to enter the e-mail and user name for your Jenkins system. Switch into your job directory and execute the “git config” command for that.

28) Explain how you can set up Jenkins job.

My approach to this answer will be to first mention how to create Jenkins job.

Go to Jenkins top page, select “New Job”, then choose “Build a free-style software project”.

Now you can tell the elements of this freestyle job:

Optional SCM, such as CVS or Subversion where your source code resides.

Optional triggers to control when Jenkins will perform builds.

Some sort of build script that performs the build (ant, maven, shell script, batch file, etc.) where the real work happens.

Optional steps to collect information out of the build, such as archiving the artifacts and/or recording javadoc and test results.

Optional steps to notify other people/systems with the build result, such as sending e-mails, IMs, updating issue tracker, etc..

29) How to create a backup and copy files in Jenkins?

To create a backup all you need to do is to periodically back up your JENKINS_HOME directory. This contains all of your build jobs configurations, your slave node configurations, and your build history. 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.

30) How will you secure Jenkins?

The way I secure Jenkins is mentioned below if you have any other way to do it than mention that:

Make sure that the global security is on.

Check if Jenkins is integrated with my company’s user directory with an appropriate plugin.

Ensure that the matrix/Project matrix is enabled to fine-tune access.

Automate the process of setting rights/privileges in Jenkins with custom version controlled script.

Limit physical access to Jenkins data/folders.

Periodically run security audits on the same.

31) Explain how you can deploy a custom build of a core plugin?

Below are the steps to deploy a custom build of a core plugin:

Stop Jenkins.

Copy the custom HPI to $Jenkins_Home/plugins.

Delete the previously expanded plugin directory.

Make an empty file called <plugin>.hpi.pinned.

Start Jenkins.

32) What you do when you see a broken build for your project in Jenkins?

There can be multiple answers to this question I will approach this task in the following way:

I will open the console output for the broken build and try to see if any file changes were missed. If I am unable to find the issue that way, then I will clean and update my local workspace to replicate the problem on my local and try to solve it.

33) What are the various ways in which build can be scheduled in Jenkins?

You can schedule a build in Jenkins in the following ways:

By source code management commits

After completion of other builds

Can be scheduled to run at a specified time (crons)

Manual Build Requests

34) What is the use of Pipelines in Jenkins?

Pipeline plugin is used in Jenkins for making the Jenkins Pipeline, which gives us the view of stages or tasks to perform one after the other in the pipeline form. It models a series of related tasks. Pipelines help the teams to review, edit and iterate upon the tasks. Pipelines are durable and it can optionally stop and wait for human approval as well to start the next task. A pipeline is extensible and can perform work in parallel. It supports complex CD requirements.

35) Explain the terms Agent, post-section, Jenkinsfile

Agent: It is directive to tell Jenkins to execute the pipeline in a particular manner and order.

Post-section: If we have to add some notification and to perform other tasks at the end of a pipeline, post-section will definitely run at the end of every pipeline’s execution.

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

 

36) Do you know about cloud computing? How can Jenkins fit into a cloud computing environment? Explain with an example.

Let us take the example of AWS cloud service. Cloud computing services use the CI/CD model so that they can push their work to the customers and constantly receive feedback. Jenkins is used to automating the CI/CD pipelines. For example, a lot of Jenkins plugins are available for many of the AWS services like Amazon EC2 and ECS.

37) What is Kubernetes? How can you integrate Jenkins with Kubernetes?

Kubernetes is a container orchestration tool. With Kubernetes, one can create multiple container instances to achieve more fault tolerance. You can use the Kubernetes deploy plugin to use it with Jenkins for continuous deploy.

38) What is the use of JENKINS HOME directory?

All the settings, logs and configurations are stored in the JENKINS_HOME directory.

39) What is a backup plugin? Why is it used?

This is a helpful plugin that backs up all the critical settings and configurations to be used in the future. This is useful in cases when there is a failure so that we don’t lose the settings.

40) What is a trigger? Give an example of how the repository is polled when a new commit is detected.

Triggers are used to define when and how pipelines should be executed.

When Jenkins is integrated with an SCM tool, for example, Git, the repository can be polled every time there is a commit.

The Git plugin should be first installed and set up.

After this, you can build a trigger that specifies when a new build should be started. For example, you can create a job that polls the repository and triggers a build when a change is committed.

41) How do you define parameters for a build in Jenkins?

A build can take several input parameters to execute. For example, if you have multiple test suites, but you want to run only one. You can set a parameter so that you are able to decide which one should be run. To have parameters in a job, you need to specify the same while defining the parameter. The parameter can be anything like a string, a file or a custom.

42) What are the ways to configure Jenkins node agent to communicate with Jenkins master?

There are 2 ways to start the node agent –

Browser – if Jenkins node agent is launched from a browser, a JNLP (Java Web Start) file is downloaded. This file launches a new process on the client machine to run jobs.

Command-line – to start the node agent using the command line, the client needs the executable agent.jar file. When this file is run, it simply launches a process on the client to communicate with the Jenkins master to run build jobs.

43) How does Jenkins authenticate users?

There are 3 ways –

The default way is to store user data and credentials in an internal database.

Configure Jenkins to use the authentication mechanism defined by the application server on which it is deployed.

Configure Jenkins to authenticate against LDAP server.

44) How can you use a third-party tool in Jenkins?

Below are the steps used for working with a third-party tool in Jenkins.

First install the third-party software

Download the plug-in that supports the third-party tool.

Configure the third-party tool in the admin console.

Then use the required plug-in from the Jenkins build job.

For different third-party tools, the procedure may vary slightly, because of the difference in configuration settings.

45) What are the types of pipelines in Jenkins?

There are 3 types –

CI CD pipeline (Continuous Integration Continuous Delivery)

Scripted pipeline

Declarative pipeline

46) What syntax does Jenkins use to schedule build job or SVN polling?

The cron syntax.

Cron syntax is represented using five asterisks each separated by a space. The syntax is as follows – [minutes] [hours] [day of the month] [month] [day of the week]. Example, if you want to set up a cron for every Monday at 11.59 pm, it would be 59 11 * * 1

47) What is DevOps and in which stage does Jenkins fit in?

DevOps is a software development practice that blends software development (Dev) with the IT operations (Ops) making the whole development lifecycle simpler and shorter by constantly delivering builds, fixes, updates, and features. Jenkins plays a crucial role because it helps in this integration by automating the build, test and deployment process.

48) Do you know any other Continuous Integration tools? How is Jenkins better than any of those?

There are many other CI tools, and the most prominent ones are –

TeamCity

Bamboo

Perforce

Circle CI

Go

ThoughtWorks

Integrity

Travis CI

There are many more. We cannot say if Jenkins is better than each because each has its own unique features. For example, TeamCity offers great .NET support but is complex and costly, Travis CI is free just like Jenkins and has good documentation too. Bamboo too offers efficient and faster builds but is not completely free and so on.

49) Name a Jenkins environment variable you have used in a shell script or batch file.

There are numerous environment variables that are available by default in any Jenkins build job. A few commonly used ones include:

$JOB_NAME

$NODE_NAME

$WORKSPACE

$BUILD_URL

$JOB_URL

Note that, as new Jenkins plug-ins are configured, more environment variables become available. For example, when the Jenkins Git plug-in is configured, new Jenkins Git environment variables, such as $GIT_COMMIT and $GIT_URL, become available to be used in scripts.

50) What is Continuous Integration In Jenkins?

In software development, multiple developers or teams work on different segments of the same web application. So in this case, you have to perform integration testing by integrating all modules. In order to do that an automated process for each piece of code is performed on a daily bases so that all your codes get tested. This process is known as continuous integration.

51) How do you achieve continuous integration using Jenkins?

Here are the steps –

All the developers commit their source code changes to the shared Git repository.

Jenkins server checks the shared Git repository at specified intervals and detected changes are then taken into the build.

The build results and test results are shared to the respective developers

The built application is displayed on a test server like Selenium and automated tests are run.

The clean and tested build is deployed to the production server.

52) What is a DSL Jenkins?

The Jenkins “Job DSL / Plugin” is made up of two parts – first, The Domain Specific Language (DSL) itself that allows users to describe jobs using a Groovy-based language, and second, a Jenkins plugin which manages the scripts and the updating of the Jenkins jobs which are created and maintained as a result.

53) How do you create Multibranch Pipeline in Jenkins?

The Multibranch Pipeline project type enables you to implement different Jenkinsfiles for different branches of the same project. In a Multibranch Pipeline project, Jenkins automatically discovers, manages and executes Pipelines for branches that contain a Jenkinsfile in source control.

54) What are the types of jobs or projects in Jenkins?

These are the types of jobs/projects in Jenkins –

Freestyle project

Maven project

Pipeline

Multibranch pipeline

External Job

Multi-configuration project

Github organization

55) What is blue ocean in Jenkins?

It is a project that was started with the purpose to rethink the user experience of Jenkins, modeling and presenting the process of software delivery by surfacing information that’s important to development teams. This is done with as few clicks as possible, while still staying true to the extensibility that is core to Jenkins. While this project is in the alpha stage of development, the intent is that Jenkins users can install Blue Ocean side-by-side with the Jenkins Classic UI via a plugin

56) What is Continuous Testing?

Continuous Testing is the process where you execute automated tests as part of the software delivery pipeline. This is done so that you get the feedback on the business risks associated with software as early as possible. It consists of evolving and extending test automation to address the increased complexity and pace of modern application development and delivery.

Continuous Testing means that testing takes place on a continuous basis without any disruption of any kind. In a Continuous DevOps process, a software change is continuously moving from Development to Testing to Deployment. The code undergoes continuous development, delivery, testing and deployment.

57) Explain how you can move or copy Jenkins from one server to another?

I will approach this task by copying the jobs directory from the old server to the new one. There are multiple ways to do that, I have mentioned it below:

You can:

Move a job from one installation of Jenkins to another by simply copying the corresponding job directory.

Make a copy of an existing job by making a clone of a job directory by a different name.

Rename an existing job by renaming a directory. Note that if you change a job name you will need to change any other job that tries to call the renamed job.

58) How can you temporarily turn off Jenkins security if the administrative users have locked themselves out of the admin console?

The JENKINS_HOME folder contains a file named config.xml. When you enable the security, this file contains an XML element named useSecurity that changes to true. If you change this setting to false, security will be disabled the next time Jenkins is restarted.

<useSecurity>false</useSecurity>

However, we must understand that disabling security should always be both a last resort and a temporary measure. Once you resolve the authentication issues, make sure that you re-enable Jenkins security and reboot the CI server.

59) What do you mean by Pipeline as a Code?

Pipeline as Code describes a set of features that allow Jenkins users to define pipelined job processes with code, stored and versioned in a source repository. These features allow Jenkins to discover, manage, and run jobs for multiple source repositories and branches — eliminating the need for manual job creation and management.

To use Pipeline as Code, projects must contain a file named Jenkinsfile in the repository root, which contains a “Pipeline script.”

Additionally, one of the enabling jobs needs to be configured in Jenkins:

Multibranch Pipeline: build multiple branches of a single repository automatically

Organization Folders: scan a GitHub Organization or Bitbucket Team to discover an organization’s repositories, automatically creating managed Multibranch Pipeline jobs for them

60) What are the features of Jenkins?

Answer: Jenkins comes with the following features:

  • Free open source.
  • Easy installation on various operating systems.
  • Build Pipeline Support.
  • Workflow Plugin.
  • Test harness built around JUnit.
  • Easy upgrades.
  • Rapid release cycle.
  • Easy configuration setup.
  • Extensible with the use of third-party plugins.

61) What are the advantages of Jenkins? Why we use Jenkins?

Answer: Jenkins is used to continuously monitor the large code base in real-time. It enables developers to find bugs in their code and fix them. Email notifications are made to the developers regarding their check-ins as a post-build action.

Advantages of Jenkins are as follows:

  • Build failures are cached during the integration stage.
  • Notifies the developers about build report status using LDAP (Lightweight Directory Access Protocol) mail server.
  • Maven release project is automated with simple steps.
  • Easy bug tracking.
  • Automatic changes get updated in the build report with notification.
  • Supports Continuous Integration in agile development and test-driven development.

62) What is Jenkinsfile?

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

63) What is Jenkins Pipeline? What is a CI CD pipeline?

Answer: The pipeline can be defined as the suite of plugins supporting the implementation and integration of continuous delivery pipelines in Jenkins.

Continuous integration or continuous delivery pipeline consists of build, deploy, test, release pipeline. The pipeline feature saves a lot of time and error in maintaining the builds. Basically, a pipeline is a group of build jobs that are chained and integrated in sequence.

64) What are Scripted Pipelines in Jenkins?

Answer: Scripted Pipeline follows Groovy Syntax as given below:

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

65) What is SCM? Which SCM tools are supported in Jenkins?

Answer:

SCM stands for Source Control Management.

SCM module specifies the source code location.

The entry point to SCM is being specified as jenkins_jobs.scm.

The job specified with ‘scm’ attribute accepts multiple numbers of SCM definitions.

66) Which CI Tools are used in Jenkin?

Answer: Jenkins supported the following CI tools:

  • Jenkins
  • GitLab CI
  • Travis CI
  • CircleCI
  • Codeship
  • Go CD
  • TeamCity
  • Bamboo

67) What is Agent Directive in Jenkins?

Answer: 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.

68)  What is the difference between Maven, Ant, and Jenkins?

Answer: Maven vs Jenkins:

Maven is a build tool like Ant. It consists of a pom.xml file which is specified in Jenkins to run the code. Whereas, Jenkins is used as a continuous integration tool and automates the deployment process. The reports of the builds can be used to set a mark for continuous delivery as well.

The below table enlists the differences between Maven, Ant, and Jenkins in a comparative way:

Maven Ant Jenkins
It is a Build Automation Tool. Java Library/Command Line Tool. Continuous Integration Tool.
Defines how the software is built and describes the software dependencies. Drives build process. Automates the software development process with Continuous Integration and facilitates Continuous Deliver.
Supports projects written in C#, Ruby. Supports projects written in C and C++. Supports version control tools like Git, AccuRev.
Executes Unit Tests as a part of the normal build cycle. Supports single file execution introduced with Java II. Can execute Apache Ant and Apache Maven.

 

69) How will you define Post in Jenkins?

Answer: Post is a section that contains several additional steps that might execute after the completion of the pipeline. The execution of all the steps within the condition block depends upon the completion status of the pipeline.

The condition block includes the following conditions – changed success, always, failure, unstable and aborted.

70) How can you secure Jenkins?

Answer: Securing Jenkins is a little lengthy process, and there are two aspects of securing Jenkins:

(i) Access Control which includes authenticating users and giving them an appropriate set of permissions, which can be done in 2 ways.

Security Realm determines a user or a group of users with their passwords.

Authorization Strategy defines what should be accessible to which user. In this case, there might be different types of security based on the permissions granted to the user such as Quick and simple security with easy setup, Standard security setup, Apache front-end security, etc.

(ii) Protecting Jenkins users from outside threats.

 

71) What is Flow Control in Jenkins?

Answer: In Jenkins, flow control follows the pipeline structure (scripted pipeline) that are being executed from the top to bottom of the Jenkins file.

72)  What are the various ways in which the build can be scheduled in Jenkins?

Answer: The build can be triggered in the following ways:

After the completion of other builds.

By source code management (modifications) commit.

At a specific time.

By requesting manual builds.

73) Why is Jenkins called a Continuous Delivery Tool?

Answer: We have seen the Continuous Delivery workflow in the previous question, now let’s see the step by step process of why Jenkins is being called as a Continuous Delivery Tool:

Developers work on their local environment for making changes in the source code and push it into the code repository.

When a change is detected, Jenkins performs several tests and code standards to check whether the changes are good to deploy or not.

Upon a successful build, it is being viewed by the developers.

Then the change is deployed manually on a staging environment where the client can have a look at it.

When all the changes get approved by the developers, testers, and clients, the final outcome is saved manually on the production server to be used by the end-users of the product.

In this way, Jenkins follows a Continuous Delivery approach and is called the Continuous Delivery Tool.

74) How did Jenkins come into existence?

Answer: Originally called Hudson, Jenkins came into existence when Oracle took over the ownership to continue development of the product, by renaming it as Jenkins.

75) What is DevOps and in which stage does Jenkins fit in?

Answer: DevOps is a software development practice which blends software development (Dev) with the IT operations (Ops) making the whole development lifecycle simpler and shorter by constantly delivering builds, fixes, updates, and features. Jenkins plays a great role because it helps in this integration by automating the build, test and deployment process.

76) What are the system requirements to install Jenkins?

Answer: The minimum configuration required is –

256MB of RAM

1 GB of drive space

Java

Web browser

77) What is a job in Jenkins?

Answer: A job or build job is a task or step in the entire build process. It could be compiling the source code, running unit tests, deploying the application to the web server and so on.

78) What are the types of pipelines in Jenkins?

Answer: There are 3 types –

CI CD pipeline (Continuous Integration Continuous Delivery)

Scripted pipeline

Declarative pipeline

79) What are the ways to configure Jenkins node agent to communicate with Jenkins master?

Answer: There are 2 ways to start the node agent –

Browser – if Jenkins node agent is launched from a browser, a JNLP (Java Web Start) file is downloaded. This file launches a new process on the client machine to run jobs.

Command line – to start the node agent using the command line, the client needs the executable agent.jar file. When this file is run, it launches a process on the client to communicate with the Jenkins master to run build jobs.

80) What is the Git plugin?

Answer: Git plugin is used when you are using Git as the repository.

81) What are the components that you can integrate Jenkins with?

Ans. Jenkins is mainly integrated with the following:

Version Control system like GIT, SVN

And build tools like Apache Maven.

82)  How do I move Jenkins from one server to another?

Ans. There are multiple ways to do that as mentioned below:

Move a job from one installation of Jenkins to another by simply copying the corresponding job directory.

Make a copy of an existing job by making a clone of a job directory by a different name.

Rename an existing job by renaming a directory.

83) Explain how to create a backup and copy files in Jenkins?

Ans. Jenkins saves all the build logs and configurations in the home directory. It includes all the slave node configurations and job configurations. For performing back of Jenkins, you should back up the JENKINS_HOME directory frequently. For copying Jenkins jobs, you should replicate the job directory.

84) How do I clone a git repository using Jenkins?

Ans. You have to enter the user name and email for your Jenkins system and turn into your job directory and execute the “git config” command for that.

85) What are the steps involved in deploying a custom build of a core plugin?

Ans. To deploy a custom build of a core plugin, you should follow the below steps:

Stop Jenkins.

Copy the custom HPI to $Jenkins_Home/plugins.

Delete the previously expanded plugin directory.

Make an empty file called . hpi. pinned.

Start Jenkins

86) Explain Continuous Testing.

Ans. Continuous Testing is the process of executing automated tests of the software delivery pipeline. It helps you to identify the business risks associated with software as early as possible. In this, testing takes place on a continuous basis without any disruption.

87) What is ‘automated testing’?

One of the main features (if not the main one!) that Jenkins is famous for is its automated testing function. It’s easy to read this online and then simply memorize that phrase just to blurt it out as an answer during one of the employer’s Jenkins interview questions. However, what if there’s this follow-up? As a concept, automated testing has become so popular that it is almost automatically assumed (no pun intended) that everyone should know what it is.

Automated testing is when a certain program (framework) tests your developed programs (web applications) without the need for human interference.

This is amazing because of several reasons – a lot of money and time are saved, testing happens much faster, there’s no room for any human-made error.

88) What are the three fundamental stages of a Jenkins pipeline?

Build the project, test the project and then deploy the project.

89) What is Ansible?

Ansible is a configuration management tool that can be used for provisioning and can be implemented into Jenkins.

90) What is the use of role based strategy plugin?

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.

91) What is the programming language that jenkins build on?

Jenkins is an open source automation server written in Java. As an extensible automation server, Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project.

92) What do you mean by jenkins file and what are its advantages?

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.

93) How do you create Multibranch Pipeline in Jenkins?

Answer # The Multibranch Pipeline project type enables you to implement different Jenkinsfiles for different branches of the same project. In a Multibranch Pipeline project, Jenkins automatically discovers, manages and executes Pipelines for branches which contain a Jenkinsfile in source control.

94)  What is blue ocean in Jenkins?

Answer # Blue Ocean is a project that rethinks the user experience of Jenkins, modelling and presenting the process of software delivery by surfacing information that’s important to development teams with as few clicks as possible, while still staying true to the extensibility that is core to Jenkins.

95) Does Jenkins Support Automation?

Jenkins is the leading open-source automation server. It contains around 1400 plugins that support in the automation and all type of development task.

96) What is Jenkins Cucumber Plugin?

Cucumber is a tool that is used for testing. It was built on the concept of BDD framework. Where test is written in BDD (Behavior-driven-development) style. Jenkins provide an important plugin to integrate with Cucumber for execution.

97) What is Jenkins Cucumber framework?

Cucumber is a testing framework which supports BDD. It was written in Ruby language. Cucumber support various types of other software platforms such as-

Watir

Spring Framework

Ruby on Rais.

PicoContainer

Selenium

98) Advantages of Cucumber?

Cucumber framework contain lot of features just like other frameworks. Check out some followings.

It supports various types of computer languages.

It provides the reusability of code.

It acts as a bridge that connect business to technical language.

It allows writing a script without the knowledge of any code.

99) What are some SCM tools Jenkins support?

Some of the source code management tools supported by Jenkins:

  • CVS
  • Git
  • Mercurial
  • Perforce
  • Clear case
  • RTC
  • Subversion

100) Have you run automated tests on Jenkins? How is it done?

Yes, this can be done easily. Automated tests can be run through tools like selenium or maven. Developers can schedule the test runs. Jenkins displays the test results and sends a report to the developers.

Related Posts:

For more Interview Questions And Answers click here