0
0
Jenkinsdevops~20 mins

What is Continuous Delivery vs Continuous Deployment in Jenkins - Practice Questions & Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Continuous Delivery & Deployment Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Difference between Continuous Delivery and Continuous Deployment

Which statement correctly describes the difference between Continuous Delivery and Continuous Deployment in a Jenkins pipeline?

AContinuous Delivery automatically deploys every change to production without manual approval, while Continuous Deployment requires manual approval before production deployment.
BContinuous Delivery skips automated testing and deploys code directly to production; Continuous Deployment includes automated testing before deployment.
CContinuous Delivery ensures code changes are automatically tested and ready for deployment, but deployment to production requires manual approval; Continuous Deployment automatically deploys every change to production without manual approval.
DContinuous Delivery and Continuous Deployment are the same and both require manual approval before production deployment.
Attempts:
2 left
💡 Hint

Think about whether production deployment happens automatically or needs a manual step.

🔀 Workflow
intermediate
2:00remaining
Jenkins Pipeline Step for Continuous Delivery

In a Jenkins pipeline, which step best represents the manual approval process typical in Continuous Delivery before deploying to production?

Astage('Deploy to Production') { steps { sh 'deploy.sh' } }
Binput 'Approve deployment to production?'; stage('Deploy to Production') { steps { sh 'deploy.sh' } }
Cstage('Deploy to Production') { steps { sh 'deploy.sh' } } post { always { input 'Approve deployment?' } }
Dstage('Deploy to Production') { steps { input 'Approve deployment?'; sh 'deploy.sh' } }
Attempts:
2 left
💡 Hint

Look for the step that pauses the pipeline and waits for manual approval before deployment.

💻 Command Output
advanced
2:00remaining
Jenkins Pipeline Output for Continuous Deployment

Given this Jenkins pipeline snippet for Continuous Deployment, what will be the output after a successful build and test?

pipeline {
  agent any
  stages {
    stage('Build') {
      steps { echo 'Building...' }
    }
    stage('Test') {
      steps { echo 'Testing...' }
    }
    stage('Deploy') {
      steps { echo 'Deploying to production...' }
    }
  }
}
A
Building...
Testing...
Deploying to production...
B
Building...
Testing...
Pipeline paused for manual approval
C
Building...
Testing...
Deployment skipped
DBuild failed, deployment not started
Attempts:
2 left
💡 Hint

Continuous Deployment means deployment happens automatically after tests pass.

Troubleshoot
advanced
2:00remaining
Pipeline Stuck Waiting for Approval

A Jenkins pipeline configured for Continuous Delivery is stuck and not progressing past the deployment stage. The pipeline script includes an input step before deployment. What is the most likely cause?

AThe <code>input</code> step is waiting for manual approval which has not been given yet.
BThe deployment script has a syntax error causing the pipeline to hang.
CThe Jenkins agent is offline, so the pipeline cannot continue.
DThe pipeline is missing the <code>stage</code> keyword before deployment.
Attempts:
2 left
💡 Hint

Think about what the input step does in a pipeline.

Best Practice
expert
3:00remaining
Best Practice for Safe Continuous Deployment

Which Jenkins pipeline practice best supports safe Continuous Deployment to production?

ADeploy to production only once a month to reduce risk.
BRequire manual approval for every deployment to production to avoid mistakes.
CDeploy to production immediately after build without running tests to save time.
DRun automated tests and deploy only if all tests pass, with monitoring and rollback steps included.
Attempts:
2 left
💡 Hint

Consider automation combined with safety measures in Continuous Deployment.