Jenkins is an open-source automation tool for continuous integration. It can be integrated with various development and testing technologies to automate various processes like build, test, and deploy the code. Jenkins mainly keeps track of the version control system and initiates & monitors a build system if there are any changes, also provides reports and notifications to alert.
What is the use of Jenkins in software development?
Various uses of Jenkins are mentioned below:
Developers and testers can automate the testing of builds and use Jenkins to detect defects in the software development lifecycle.
Developers can continuously monitor the code in real time and integrate changes into the build.
Jenkins has plugin capabilities for building a CI/CD pipeline which facilitates continuous integration and delivery.
What do you understand by Continuous Integration, Continuous Delivery, and Continuous Deployment?
Continuous Integration (CI) is a DevOps software development practice where the changes made to code are integrated into the central repository whenever a patch is ready to run automated builds, tests, deployment, and monitoring continuously.
Continuous Delivery (CD) is the next phase after continuously integrated (CI) where code changes will be tested & deployed continuously into a specific environment.
Continuous Deployment (CD) is the final stage in the DevOps pipeline which refers to the automatic release of any code changes from the repository to the production stage after all the quality checks are successful.
What are the main features of Jenkins?
Main features of Jenkins:
Jenkins job help in automating the process of build, testing, and deploy of any changes to the software.
Jenkins is a free and open-source automation tool.
Jenkins provides a huge number of plugins.
Jenkins provides pipeline support.
Jenkins is easy to set up and install on multiple operating systems.
Jenkins has very fast release cycles.
Jenkins is easy to upgrade.
Explain the steps to install Jenkins.
Install Java Development Kit (JDK).
Set the Path for the Environmental Variable for JDK.
Download and Install Jenkins.
Run Jenkins on “http://localhost:8080/” or change hostname during installation if 8080 is busy.
How will you start Jenkins?
Download and deploy Jenkins war File from the Jenkins site
Open the command prompt and navigate to the directory where Jenkins war is present using the “cd path” command
Run command Java -jar Jenkins.war -httpport-portname (if 8080 port is busy and you want to start jenkins on any other port else remove “-httpport-portname”).
What do you understand by Groovy in Jenkins?
It is a dynamic object-oriented programming language also used as a scripting language for Java platforms having syntax very similar to Java, with lots of Java compatibility and Development support features.
It is used to write code for the Scripted Jenkins pipeline.
It also enables different teams to Integrate their work in different languages.
What is a pipeline in Jenkins?
Jenkins pipeline is a sequence of steps controlled by a defined logic which manages the continuous integration and continuous delivery of all the code or releases in the SDLC and DevOps life cycle.
What are the different types of pipelines available in Jenkins?
Jenkins pipelines are mainly of two types:
Declarative pipeline: Stages are predefined to build any job/pipeline where the user just needs to fill in the details and create a pipeline.
Scripted pipelines: Stages are custom-defined & groovy syntax is used to create jobs/pipelines which provides better control & fine-tuned execution levels.
What do you understand by Jenkins file?
It is a text file that has the steps for running a Jenkins Pipeline and is registered into the source control repository of a project.
Explain the steps to create a job in Jenkins.
Select a New item from the Dashboard.
Enter the name for the job under the “Enter an Item name” field.
Select a Freestyle project.
Click on the OK button to create a new job
Now the job is created and the next page will allow you to configure your job.
Enter all the details under all details as per project need and save.
Now the job is ready to get triggered as per the Build triggers setup.
Explain the steps to create a pipeline in Jenkins.
Can you describe some important features of the Jenkins pipeline?
What are the main components to integrate with Jenkins?
Jenkins is mainly integrated with below two components:
Version Control systems like Git and SVN to access source code repository
Build tools like Maven to access the build script.
Explain the steps how Jenkins actually works?
Jenkins keeps on checking the repositories regularly, as soon as developer check-in their code and Jenkins identify any change, immediately Jenkins uses this changed code to prepare a new build.
Now Jenkins will move from one stage to another as defined in pipeline. In case of any failure in any stage, build will get stop and Jenkins will send email to the respective team otherwise if build gets completed successfully then code will get deploys in the defined server.
At last post successful build testing will began as per trigger mentioned in Jenkins job, results will be shared with the team post testing completion.
Why do testers use Jenkins for Selenium?
Integration of Jenkins with Selenium automates the testing process as part of the build process, which means testing will get automatically triggered as soon as any code changes get deployed.
Explain the steps to integrate GIT with Jenkins.
Explain the steps to integrate Jenkins with Maven.
If your first job is successful but the second job gets failed in any pipeline, then how will you manage?
you need to choose the option “restart from the stage” to restart the pipeline from the point where it failed, it will restart the failed job.
How will you fix any broken build in Jenkins?
Open console output to find out the root cause of any broken build, if it happened because of any file changes which were missed then include that and retrigger the build but in case you don’t find any issue, then try to replicate the same problem at the local workspace and try to troubleshoot it.
How will you parametrize any Jenkins job?
While creating any job if you want to parametrize any job then select the “This project is parameterized” checkbox under the configuration section, “Add Parameter” dropdown will get enabled with the parameter types list. Users can add any number of parameters from the list.
What is the use of the JENKINS_HOME directory?
JENKINS_HOME directory keeps the details of all the settings, logs, and configurations in XML files.
JENKINS_HOME directory contains a subdirectory for every Jenkins build job being operated. Each subdirectory has further two subdirectories along with some other files:
The first one is to store the history of all the builds performed for this job
The second is Workspace is located at the place where Jenkins is building the project, it contains the source code.
Explain the steps to configure the Jenkins node agent to communicate with the Jenkins master.
Explain the steps to create a slave node in Jenkins.
What is a trigger in any pipeline?
Explain the steps to create a Multibranch Pipeline in Jenkins.
What will you do if a Jenkins agent is offline?
What is the Blue Ocean?
How will you temporarily stop a scheduled job from being executed?
How will you share information between different build steps or stages in a Jenkins Job?
Leave a Reply