What is a build artifact? Give Java, JS, and C++ examples.
Your grasp of the source-to-deployable boundary in CI/CD.
Define artifacts as compiled outputs; list JAR/WAR for Java, webpack bundle for JS, and binary/.so for C++; note immutability.
WHAT THIS TESTS: This question probes whether you understand the precise boundary between version-controlled source code and the generated outputs that flow through a CI/CD pipeline. A senior engineer should know that artifacts are immutable, versioned, and stored in repositories, not just files that get built.
A GOOD ANSWER COVERS: First, a crisp definition: a build artifact is any file produced by a build or compilation step that is not human-edited source code. Second, domain-specific examples: for a Java web application, mention a JAR file for a microservice or a WAR file for a servlet container deployment; for a front-end JavaScript project, mention the webpack or Vite output bundle, typically minified JS and CSS with content-hashed filenames like main.a3f2b1c.js; for a C++ application, mention an ELF executable, a static library (.a), or a shared object (.so) on Linux, plus debug symbols if stripped separately. Third, lifecycle context: artifacts are emitted by the build stage, published to an artifact repository such as Nexus, Artifactory, or an S3 bucket, and then consumed by deploy or test stages. Fourth, immutability: once published, an artifact should never be overwritten; a new build gets a new version or hash.
COMMON WRONG ANSWERS: Calling Git tags or Dockerfiles artifacts. Treating npm or Maven dependencies as artifacts rather than inputs. Claiming a Docker image is not an artifact; while it is a different packaging format, it is still a build output. Saying artifacts are only binaries and forgetting front-end bundles or infrastructure templates. Failing to mention that artifacts are typically separated from source by being stored in binary repositories, not Git.
LIKELY FOLLOW-UPS: How do you version artifacts and trace them back to the source commit? What is the difference between an artifact repository and a package registry? When would you promote an artifact versus rebuilding from source? How do you handle artifact retention and cleanup in a large monorepo?
ONE CONCRETE EXAMPLE: In a typical Java Spring Boot pipeline, Maven compiles source into classes, packages them into an executable JAR like orders-service-2.4.1.jar, and the CI runner pushes it to an Artifactory repository under a path that includes the Git SHA. The deploy stage downloads that exact JAR and runs it in Kubernetes. The JAR is the artifact; the pom.xml and Java files are source; the Maven dependencies are cached inputs.
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.