Skip to content
tezvyn:

Describe the stages of a CI/CD pipeline for a containerized app

Source: ibm.comMediumHow cards are made

Describe the stages of a CI/CD pipeline for a containerized app

This tests your practical knowledge of automated software delivery and risk management. A strong answer outlines CI, build, test, and deploy stages, including container-specific steps like image scanning and quality gates like automated testing and…

What's really being asked

This question assesses your hands-on experience with modern DevOps practices. The interviewer is looking beyond textbook definitions to see if you understand the flow of code from a developer's machine to a live customer, specifically for containerized services. They are testing your understanding of automation, quality control (gates), and risk mitigation in a production environment.

The full answer

A senior-level answer walks through four distinct phases. First, the Continuous Integration (CI) phase, triggered by a pull request, which runs static analysis (SAST, linting) and unit tests. Second, the Build phase, where a Docker image is created, tagged with a commit hash, scanned for vulnerabilities (e.g., using Trivy or Snyk), and pushed to a container registry like ECR or GCR. Third, the Staging/Testing phase, where the new image is deployed to a production-like environment to run integration tests, API contract tests, and load tests. This is a critical quality gate. Fourth, the Production Deployment phase, which uses a safe strategy like blue-green or canary deployment. This phase must include post-deployment monitoring and automated rollback procedures.

The mistakes people make

A common red flag is describing a generic pipeline that omits container-specific steps like building the image, scanning it for vulnerabilities, or pushing it to a registry. Another mistake is being vague about quality gates, simply saying "we run tests" instead of specifying what tests run at which stage (e.g., unit tests pre-build, integration tests post-deployment to staging). Confusing Continuous Delivery (requires manual approval for production) with Continuous Deployment (fully automated to production) is also a frequent error. An answer that ends at deployment without mentioning monitoring and rollback is incomplete.

What usually comes next

"How would you implement a zero-downtime deployment for this service?" (Tests knowledge of blue-green, canary). "What specific metrics would you monitor after deployment to decide if a rollback is necessary?" (Tests production monitoring sense: error rates, latency, CPU/memory). "How would you handle database schema migrations within this pipeline?" (Tests understanding of stateful vs. stateless components).

A concrete example

For our payments service, a PR kicks off a GitHub Action. It first runs a SonarQube scan and requires unit test coverage to remain above 90%. On merge to main, it builds a Docker image, scans it with Trivy for critical vulnerabilities, and pushes it to ECR. That image is then automatically deployed to our staging Kubernetes cluster. We run a full Postman test suite against it. If all tests pass and p99 latency is under 150ms, a manual approval is required in Slack via a ChatOps bot to trigger the production canary deployment, which gradually shifts 10% of traffic over 30 minutes before a full rollout.

Interview question

Which set of actions primarily defines the "Build" phase for a containerized application in a CI/CD pipeline?

  • a.Executing static analysis, running unit tests, and merging code to the main branch.
  • b.Creating a Docker image, scanning it for vulnerabilities, and pushing it to a container registry.Correct
  • c.Deploying to a staging environment, running integration tests, and performing load tests.
  • d.Implementing a canary release, enabling post-deployment monitoring, and configuring automated rollbacks.
Why?

The card explicitly states that the Build phase involves creating a Docker image, scanning it for vulnerabilities, and pushing it to a container registry. The other options describe activities belonging to the Continuous Integration, Staging/Testing, or Production Deployment phases, respectively.

Just read this? Test yourself on what you have been reading.

Read the original → ibm.com

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on ci/cd — each one lists the topics its interview covers.

See open roles