02 / 06

What is CI and CD?

CI/CD is a set of automated practices combining Continuous Integration (frequently merging and testing code) and Continuous Delivery/Deployment (automating releases to production) to deliver software faster and more reliably

CI/CD is a core practice in modern software development that automates the process of building, testing, and delivering code changes. CI stands for Continuous Integration, while CD stands for either Continuous Delivery or Continuous Deployment. Together, they form a pipeline that helps teams deliver software updates more frequently, with less risk and better quality.

Continuous Integration is the practice of frequently merging code changes into a shared repository, often multiple times per day. Each merge triggers an automated build and test process. The main goal is to detect integration issues early, ensuring that changes work together and don't break the existing codebase. When tests fail, developers get immediate feedback and can fix problems before they compound.

Continuous Delivery extends CI by ensuring that code is always in a deployable state. After the CI process passes, the code is automatically packaged and prepared for deployment to production. However, the actual deployment to production requires manual approval. This approach gives teams the flexibility to choose when to release, while maintaining confidence that the code is production-ready.

Continuous Deployment takes automation one step further by automatically deploying every change that passes the CI pipeline directly to production, without manual intervention. This requires robust testing and monitoring practices, as changes reach users immediately after passing automated checks. It's ideal for teams that need to release updates very frequently.

Key Benefits of CI/CD
  1. 1

    Faster time to market: Automating the release process allows teams to deliver features and fixes more frequently.

  2. 2

    Higher quality: Automated testing catches bugs early before they reach production.

  3. 3

    Reduced risk: Smaller, frequent deployments are less risky than large, infrequent releases.

  4. 4

    Improved developer productivity: Developers spend less time on manual processes and more time building features.

  5. 5

    Faster feedback: Teams get immediate feedback on code changes, enabling rapid iteration.

Difficulty: 5/10
Topics: continuous integration, continuous delivery, Jenkins pipelines

Scenario Questions

0-2 years experience
  1. 1

    How would you set up a simple Jenkins pipeline to build and run unit tests for a new microservice?

  2. 2

    If a Jenkins job fails during the test stage, what steps would you take to identify and fix the problem?

  3. 3

    What happens in Jenkins when you push a commit to Git and have a webhook configured for CI?

2-5 years experience
  1. 1

    We need to add a deployment step to our existing Jenkins pipeline that pushes a Docker image to a registry. What considerations would you make, and how would you implement it?

  2. 2

    During a release, the CD stage started deploying an older version of the app. How would you troubleshoot why Jenkins is using the wrong artifact?

  3. 3

    Explain the trade‑offs between using Jenkins scripted pipelines versus declarative pipelines for a feature‑branch workflow.

5-8 years experience
  1. 1

    Our organization runs hundreds of parallel builds on a shared Jenkins master, and we’re seeing performance degradation. How would you redesign the CI/CD architecture to improve scalability and reliability?

  2. 2

    We need to enforce that only builds passing all tests can be promoted to production, but we also want fast feedback for developers. How would you design a Jenkins pipeline and supporting tooling to achieve this?

  3. 3

    Describe how you would implement blue‑green deployments using Jenkins, and what failure handling you would put in place.

8+ years experience
  1. 1

    We are migrating from a legacy on‑prem Jenkins setup to a cloud‑native CI/CD platform. What strategy would you use to migrate pipelines, credentials, and artifacts while minimizing disruption?

  2. 2

    Multiple teams share the same Jenkins instance, leading to conflicting plugin versions and security concerns. How would you restructure the CI/CD ecosystem at an organization‑wide level?

  3. 3

    How would you design a governance model for CI/CD across dozens of services, ensuring compliance, auditability, and consistent rollout practices using Jenkins as a central orchestrator?

Follow-up Questions

  • What metrics would you track to gauge the health of your CI pipeline?
  • How would you handle a flaky test that intermittently fails in the CI stage?
  • Can you describe a situation where you had to roll back a deployment triggered by Jenkins and how you did it?