DevOps / Jenkins Interview questions
1. What is Jenkins tool?
Jenkins is an open-source free automation tool used to build and test software projects. The tool makes it painless for developers to integrate changes to the project. Jenkins' primary focus is to keep track of the version control system and initiate and monitor a build system if there are any ch...
2. Features of Jenkins.
free and open-source automation tool, Jenkins provides a vast number of plugins, Easier to set up on various operating systems, Provides pipeline support, Fast release cycles , Easier upgrades.
3. How to install Jenkins?
The Jenkins Web application ARchive (WAR) file can be started from the command line like this: Download the latest stable Jenkins WAR file to an appropriate directory on your machine. Open up a terminal/command prompt window to the download directory. Run the command java -jar jenkins.war. Browse...
4. Mention the two components Jenkins is mainly integrated with?
Version Control systems like GIT, SVN. And build tools like Apache Maven, and Gradle.
5. Mention some of the useful plugins in Jenkin?
Maven plugin Amazon EC2 HTML publisher JUnit Plugin JIRA plugin Green Balls Mailer Plugin Slack Notification plugin Docker plugin Pipeline plugin
6. Does Jenkins support continuous integration?
Yes.
7. Explain "Continuous Integration" (CI) with reference to Jenkins?
Continuous Integration is a software development process where the code is continuously tested after a commit, to ensure there are no defects/bugs. In large teams, many developers work on the same code base. Thus, any multiple commits can cause a bug. With continuous integration, bugs can be iden...
8. What is Continuous Delivery and Continuous Deployment in Jenkins.
Continuous Delivery (CD) is the process of building, testing, and delivering improvements to the software code. This is still a manual process and deployment happens by clicking a button. Continuous deployment goes one step further than continuous delivery. With this practice, every change that p...
9. What is meant by CI/CD pipeline?
A continuous integration and continuous deployment (CI/CD) pipeline is a series of steps that must be performed in order to deliver a new version of software. CI/CD pipeline is a process that drives software development through a path of building, testing, and deploying code. By automating the pr...
10. Explain Jenkins Pipeline.
Jenkins Pipeline (or simply "Pipeline") is a suite of plugins that supports implementing and integrating continuous delivery pipelines into Jenkins. A continuous delivery pipeline is an automated expression of your process for getting software from version control right through to your users and ...
11. What is JenkinsFile?
A Jenkinsfile is a text file that contains the definition of a Jenkins Pipeline and is checked into source control. Consider the following Pipeline which implements a basic three-stage continuous delivery pipeline. pipeline { agent any stages { stage('Build') { steps { echo 'Building..' } } stage...
12. Types of Syntax used in creating Jenkinfile.
There are two types of syntax using which we can define a Jenkinsfile: Declarative Pipeline syntax, is a new feature that used code for the pipeline. It provides a limited pre-defined structure. Thereby, it offers an easy & simple continuous delivery pipeline. Moreover, it uses a pipeline block. ...
13. What is a Jenkins project?
A Jenkins project involves steps and post-build actions and is a repeatable build job.
14. Mention different CI/CD tools.
TeamCity, Bamboo, Perforce, Circle CI, Go, ThoughtWorks, Integrity, and Travis CI.
15. Difference between Hudson and Jenkins.
Hudson was the earlier name and version of the current Jenkins. The project got renamed from Hudson to Jenkins.
16. What is Blue Ocean plugin in Jenkins?
Blue Ocean is a new user experience for Jenkins based on a personalizable, modern design that allows users to graphically create, visualize and diagnose Continuous Delivery (CD) Pipelines.
17. Components of a Jenkins Pipeline.
A Pipeline is a user-defined model of a CD pipeline. A Pipeline's code defines your entire build process, which typically includes stages for building an application, testing it, and then delivering it. Also, a pipeline block is a key part of the Declarative Pipeline syntax. A node is a machine t...
18. Explain "sh" and "junit" pipeline steps.
sh is a Pipeline step (provided by the Pipeline: Nodes and Processes plugin) that executes the given shell command. junit is another Pipeline step (provided by the JUnit plugin) for aggregating test reports.
19. Advantages of using Jenkins Pipeline.
Code: Pipelines are implemented in code and typically checked into source control, giving teams the ability to edit, review, and iterate upon their delivery pipeline. Durable: Pipelines can survive both planned and unplanned restarts of the Jenkins controller. Pausable: Pipelines can optionally s...
20. Difference between freestyle and pipeline jobs in Jenkins.
You configure a freestyle job in Jenkins using the GUI by adding steps to the build. Freestyle jobs give you a lot of flexibility. But, you will struggle to configure complex continuous delivery scenarios. Pipeline jobs allow you to create a set of instructions using code. You can also easily vis...
21. Explain how the Jenkins process works.
Jenkins polls for changes in repositories regularly. Once the changes are defined, Jenkins detects them and uses them to prepare a new build. After that, Jenkins will transverse through various stages in its usual pipeline. As one stage completes, the process will move further on to the next stag...
22. How to integrate Git with Jenkins?
With the help of the Git plugin Jenkins can easily pull source code from any Git repository that the Jenkins build node can access. The GitHub plugin extends upon that integration further by providing improved bi-directional integration with GitHub. Allowing you to set up a Service Hook that will...