Discover how automating software delivery can save you hours of tedious work and avoid costly mistakes!
What is Continuous Delivery vs Continuous Deployment in Jenkins - Why It Matters
Imagine you have a small shop where you make and sell cakes. Every time you bake a new cake, you have to personally deliver it to each customer. If you have many customers, this takes a lot of time and effort.
Delivering cakes by yourself means you can make mistakes like delivering the wrong cake, forgetting some customers, or being very slow. This slows down your business and makes customers unhappy.
Continuous Delivery and Continuous Deployment are like having a smart delivery system that automatically packs and sends cakes to customers quickly and correctly. This system reduces mistakes and speeds up delivery.
Bake cake -> Pack cake -> Call delivery person -> Deliver cake
Bake cake -> Automated tests -> Auto package -> Auto deploy to customers
It enables fast, reliable, and automatic delivery of software updates to users without manual steps.
A software team uses Jenkins to automatically test and prepare their app. With Continuous Delivery, they can choose when to release updates. With Continuous Deployment, updates go live automatically after passing tests.
Manual delivery is slow and error-prone.
Continuous Delivery automates preparation but lets humans decide when to release.
Continuous Deployment automates the entire release process, making updates instant.
Practice
Continuous Delivery and Continuous Deployment?Solution
Step 1: Understand Continuous Delivery
Continuous Delivery automates preparing the software for release but waits for a manual step to deploy to production.Step 2: Understand Continuous Deployment
Continuous Deployment automates the entire process, including automatic deployment to production without manual approval.Final Answer:
Continuous Delivery requires manual approval before production deployment, Continuous Deployment does not. -> Option CQuick Check:
Manual approval = Continuous Delivery [OK]
- Confusing which process needs manual approval
- Thinking both deploy automatically
- Mixing build and deploy steps
Solution
Step 1: Identify Jenkins step for manual pause
Theinputstep in Jenkins pipeline pauses the pipeline and waits for user approval.Step 2: Confirm other steps roles
deployruns deployment,buildcompiles code,testruns tests, none pause for approval.Final Answer:
input -> Option AQuick Check:
Manual approval step = input [OK]
- Choosing deploy as manual step
- Confusing build or test with approval
- Not knowing Jenkins pipeline steps
stage('Deploy to Prod') {
steps {
input 'Approve deployment?'
sh 'deploy.sh'
}
}What happens when this pipeline reaches the
Deploy to Prod stage?Solution
Step 1: Analyze the input step in the stage
Theinput 'Approve deployment?'pauses the pipeline and waits for a user to approve before continuing.Step 2: Understand what happens after approval
After approval, the shell scriptdeploy.shruns to deploy the application.Final Answer:
The pipeline pauses and waits for manual approval before running deployment. -> Option AQuick Check:
input step causes pause = The pipeline pauses and waits for manual approval before running deployment. [OK]
- Assuming deploy runs immediately
- Thinking pipeline skips deployment
- Confusing syntax error with input step
stage('Deploy') {
steps {
input 'Approve deployment?'
sh 'deploy.sh'
}
}What is the problem if you want full Continuous Deployment?
Solution
Step 1: Identify manual approval in pipeline
Theinputstep pauses for manual approval, which is not allowed in full Continuous Deployment.Step 2: Understand Continuous Deployment automation
Continuous Deployment requires no manual steps; every change deploys automatically.Final Answer:
The input step causes manual approval, breaking full automation. -> Option BQuick Check:
Manual approval breaks Continuous Deployment [OK]
- Thinking syntax error causes failure
- Assuming deploy.sh script is the problem
- Confusing stage name with functionality
Solution
Step 1: Identify manual approval in Continuous Delivery
Continuous Delivery pipelines pause for manual approval using theinputstep.Step 2: Remove manual approval for Continuous Deployment
To achieve Continuous Deployment, remove theinputstep so deployment happens automatically after tests.Final Answer:
Remove the manual input approval step so deployment runs automatically. -> Option DQuick Check:
Remove manual steps for Continuous Deployment [OK]
- Adding manual steps instead of removing
- Changing unrelated build steps
- Only renaming pipeline without changing logic
Ready to prove it?
Pass the test and this pattern moves unknown
