Interview Prep/CI/CD/Build Tools, Nexus, SonarQube and Test Failures

Build uses a cached layer and ships stale code.

AdvancedTroubleshootingBuild Tools, Nexus, SonarQube and Test Failures
Answer

Likely causes → COPY . . before dependency steps or a cache key not invalidating on source changes; stale remote cache.

Diagnose → docker build --progress=plain and look for CACHED.

Fix → Fix layer order, and use --no-cache or invalidate cache for the release build.

Prevent → Bake the commit SHA into the image label and verify at deploy.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Build Tools, Nexus, SonarQube and Test Failures