Day 29 : Jenkins Important interview Questions


Questions
- What’s the difference between continuous integration, continuous delivery, and continuous deployment?
Continuous Integration : Automatically build and test code every time a developer pushes to the repo
a. Developers frequently merge code changes into a shared repo (usually several times a day).
b. Each push triggers an automated build and test process.CI helps catch bugs early and ensures the codebase stays healthy.
Tools used : GitHub Actions, Jenkins, GitLab CI, CircleCI, Travis CI
CI = Automatically test and validate changes with each code push
Continuous Delivery (CD) : Automatically prepare the application for release to production.
a. Builds on top of CI. After CI succeeds, the code is automatically packaged and deployed to a staging or testing environment
b. Each push triggers an automated build and test process.CI helps catch bugs early and ensures the codebase stays healthy
Tools Used: Argo CD, Spinnaker, AWS Code Pipeline, GitLab CI/CD.
CD = Automatically deliver to staging; manual trigger to production
Continuous Deployment (CD) : Automatically release every change to production without manual approval.
a. Extends Continuous Delivery by removing the manual approval step. Every passing build gets automatically deployed to production.
Tools Used: Argo CD, Spinnaker, AWS Code Pipeline, GitLab CI/CD.
Benefits of CI/CD
CI/CD (Continuous Integration and Continuous Delivery/Deployment) offers huge benefits for both developers and organizations
a. Faster Release Cycles
b. Improved Code Quality
c. Reduced Manual Work
d. Better Testing & Coverage
e. Early Detection of Issues
f. Faster Feedback for Developers
g. Consistent Deployments
h. Easier Collaboration Across Teams
i. Rollbacks & Recovery
What is meant by CI-CD?
CI/CD stands for Continuous Integration and Continuous Delivery (or Continuous Deployment) — it's a DevOps practice that automates the software development lifecycle from code integration to deployment.
a. Continuous Integration (CI) : Automatically build and test code every time a developer pushes changes.
b. Continuous Delivery (CD) : Automatically prepare code for release to production after successful CI.
c. Continuous Deployment (CD) : Every successful code change is automatically deployed to production.
What is Jenkins Pipeline?
A Jenkins Pipeline is a set of automated steps written in code (usually in a file called
Jenkinsfile
) that defines the entire process of building, testing, and deploying your application. It helps implement CI/CD workflows using Jenkins in a scripted and repeatable way.There are two types of jenkins pipeline :
a. Declarative pipeline
b. Scripted Pipeline
How do you configure the job in Jenkins?
a. Login to Jenkins
b. Create a New Job (Select Freestyle or Declarative Pipeline)
c. Configure Job Details
d. Source Code Management (SCM)
e. Add Build Triggers
f. Add Build Steps
g. Save and Run
Where do you find errors in Jenkins?
a. Console output
b. From system logs where Jenkins is hosted i.e. /var/log/jenkins/jenkins.log
c. Pipeline View / Stage View (For Jenkins Pipelines)
In Jenkins how can you find log files?
a. Build Logs(Per Job) from Jenkins UI
b. System Logs (/var/log/jenkins/jenkins.log)
c. Pipeline Logs (With Stages)
Jenkins workflow and write a script for this workflow?
How to create continuous deployment in Jenkins?
Steps to create continuous deployment in Jenkins
a. Create a pipeline job
b. Write the Jenkins pipeline
c. Add Webhooks(optional)
Why we use pipeline in Jenkins?
We use Pipelines in Jenkins to automate the complete software development lifecycle (SDLC) — from code checkout to build, test, and deployment — in a repeatable, scalable, and efficient way.
Is Only Jenkins enough for automation?
Jenkins is the core automation engine, but it's not enough by itself for full-stack DevOps automation.
You’ll need to plug in tools based on:
Your tech stack
Your environment (cloud/on-prem)
Your pipeline needs (testing, security, infra)
How will you handle secrets in Jenkins?
a. Use Jenkins credential Manager
b. SSH Keys for Deployments
c. AWS/GCP Cloud Credentials : Jenkins automatically exports
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
d. Inject Secrets into Shell Scripts
Explain diff stages in CI-CD setup
Code Commit → Build → Test → Analyze → Package → Deploy → Notify
Name some of the plugins in Jenkins?
Some of the plugins in Jenkins are :
a. Credentials Plugin
b. Mask Password Login
c. Aws credential login
d. Vault plugin
e. Docker plugin
f. Ansible plugin
Subscribe to my newsletter
Read articles from Rahul Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
