# ci/cd

// [23] real interview questions. Answers and sources live in the practice app.

practice this topic
  1. What is the difference between Continuous Delivery and Continuous Deployment?(junior)
  2. Walk me through a CI/CD process from the moment a developer opens a PR to the change running in production.(mid)
  3. Where do you store CI/CD pipeline definitions, and what are the trade-offs?(mid)
  4. You can run a pipeline on a VM, a bare-metal machine, or a container. How do you decide which worker to use?(senior)
  5. How would you implement continuous deployment for an application that depends on several other applications/services?(senior)
  6. How do you measure the quality of your CI/CD process? Which metrics matter?(senior)
  7. You need unit tests to run on every submitted change. Describe the pipeline stages you'd build.(junior)
  8. Managing a dozen CI jobs in the UI is fine. How do you manage the creation and deletion of hundreds of jobs every month?(senior)
  9. Whenever a build fails, the owning team should be notified with the failure reason. How do you set that up?(mid)
  10. How do you secure a CI server like Jenkins?(senior)
  11. How do you run parts of one pipeline in parallel on multiple workers (e.g. tests split across machines)?(mid)
  12. What is a runner in GitHub Actions? When would you use a self-hosted runner instead of a GitHub-hosted one?(junior)
  13. In GitHub Actions, jobs run in parallel by default. How do you make one job wait for another, and share its output?(mid)
  14. How do you add a CI workflow to a GitHub repository from scratch?(junior)
  15. In GitHub Actions, what exactly is an 'action', and how does it relate to steps, jobs, and workflows? What risk comes with marketplace actions?(junior)
  16. Every CI run reinstalls all dependencies from scratch. How does caching work in GitHub Actions (keys, restore-keys), and what should you never cache?(mid)
  17. Your library must be tested on three OSes and four language versions. What is a matrix build, and which knobs matter (include/exclude, fail-fast, max-parallel)?(mid)
  18. Your pipeline fails on roughly one run in ten with unrelated test failures, and the team has started clicking 'rerun' without reading. How do you attack flaky tests systematically?(senior)
  19. Where do secrets live in GitHub Actions, what protections do they get, and what are the classic ways they still leak?(senior)
  20. Compare blue-green, canary, and rolling deployments. How do you choose, and what's the database catch?(mid)
  21. Your pipeline must deploy to staging automatically but require a human sign-off before production. How do you build that gate in GitHub Actions?(mid)
  22. In GitHub Actions, what's the difference between an artifact and a cache? Give a correct use of each.(junior)
  23. Every PR shows green checks, yet main keeps breaking after merges. Why do green PRs still break main, and what do you change?(senior)