DevOps Engineer interview question · Most asked
What does 'build once, deploy many' mean, and why does it matter?
Summary
The same build artifact (a container image digest, a JAR, a package) is promoted unchanged from test to staging to production; only configuration differs per environment. You never rebuild for production.
Longer Answer
Rebuilding per environment means what you tested is not what you ship: dependencies may resolve differently, base images may have changed, and build steps may vary. Promoting a single artifact gives traceability (this digest came from this commit and passed these tests), simpler rollbacks (redeploy the previous digest) and supply-chain integrity (sign once, verify everywhere). It requires externalised configuration and environment-agnostic builds.
Key Points
- Same artifact through every environment.
- Config injected per environment.
- Traceability and easy rollback.
- Rebuilding breaks test validity.
More most-asked DevOps Engineer questions
- How do you handle secrets in CI/CD pipelines securely?
- What are DORA metrics, and how would you use them without gaming them?
- What happens when you type a URL into a browser and press Enter?
- Design a CI/CD pipeline for a containerised microservice from commit to production.
- How do you handle database schema migrations in an automated deployment pipeline?
- Your CI pipeline takes 45 minutes. How would you speed it up?
- What is platform engineering, and how does it relate to DevOps?
- How do you secure the CI/CD pipeline itself against supply-chain attacks?