Coding Interviews

CI/CD Interview Questions for DevOps and Developers

Mar 16, 2026Updated: Mar 16, 2026
CI/CD Interview Questions for DevOps and Developers

1. What is CI/CD?

CI/CD stands for Continuous Integration and Continuous Deployment. It automates testing and deployment of code, ensuring faster and more reliable releases.

2. What is a CI/CD pipeline?

A CI/CD pipeline is a set of automated steps that run after code is pushed — such as installing dependencies, testing, building, and deploying the app.

3. What tools have you used for CI/CD?

I’ve used GitHub Actions for automating CI/CD. For deployment, I’ve used Vercel, Render, and Docker on VPS.

4. What is the role of the .yml file in CI/CD?

The .yml file defines the CI/CD workflow steps (e.g., install, test, deploy) that the CI/CD tool (like GitHub Actions) should execute.

5. How do you deploy a MERN app using CI/CD?

Deploying a MERN (MongoDB, Express, React, Node.js) application using a CI/CD pipeline involves automating the build, testing, and deployment process whenever changes are pushed to the repository.

Typical Workflow

  1. Code Push
    • Developers push code to a Git repository such as GitHub or GitLab.
  2. Continuous Integration (CI)
    • A CI tool (e.g., GitHub Actions, GitLab CI, Jenkins) automatically:
      • Installs dependencies
      • Runs tests
      • Builds the application
  3. Frontend Deployment (React)
    • The React application is built using:
    npm run build
    
CI runs tests and build first, then deploys if everything passes.
The build output is deployed to hosting platforms such as Vercel, Netlify, or AWS S3 + CloudFront.
4. **Backend Deployment (Node.js / Express)**
   The backend API is deployed to a server or cloud platform such as:
   - Render
   - AWS EC2
   - Docker containers
   - VPS using SSH deployment via GitHub Actions
Database Connection
The backend connects to MongoDB (e.g., MongoDB Atlas) using environment variables stored securely in the deployment platform.
## 6. What are GitHub Actions Secrets?
Secrets are encrypted variables (e.g., API keys, DB URIs) stored securely in GitHub and used in workflows via ${{ secrets.MY_SECRET }}.
## 7. How do you prevent broken code from being deployed?
By running tests and lint checks in the CI step. If any step fails, the deployment is skipped automatically.

Related Articles

Comments (0)

No comments yet. Be the first!