CI/CD · Ship safely, repeatedly
Why use an artifact repository instead of copying files between jobs?
Short answer
An artifact repository gives immutable versioned storage with access control, checksums, retention and promotion. Jobs pull the exact tested artifact instead of relying on ephemeral workspace files or rebuilds.
Pipeline workspaces are temporary. If a later stage needs the build output, it should fetch it from a registry or artifact repository by an immutable identifier, not depend on a file left on a runner.
- Store build outputs, packages, container images and their metadata in one governed place
- Enforce immutability so a published version cannot be silently overwritten
- Control read and write access per repository and environment
- Apply retention policies that still preserve enough history for rollback and audit
- Record checksums and signatures for integrity verification
- Promote artifacts by reference rather than copying and re-tagging inconsistently
curl --fail --user $USER:$TOKEN --upload-file dist/app-1.8.3.tar.gz https://artifacts.example.com/repository/releases/app-1.8.3.tar.gzFollow-ups you should expect
Interviewers use these to check whether the first answer was understanding or memorisation.
- 1What is the difference between an artifact repository and a container registry?
- 2How do you prevent overwriting a released version?
- 3What retention policy would you choose?
- 4How do you verify an artifact before deploying it?
Say it in the interview
An artifact repository gives a durable access-controlled place to store and retrieve build outputs by immutable version. Jobs fetch the exact artifact that was tested instead of rebuilding or depending on a runner filesystem. I enforce immutability, store checksums and signatures, and set retention long enough to support rollback and audit. Promotion happens by reference so every environment consumes the same bytes.
Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.
Related questions
Reading is step one
Now say it out loud.
Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live CI/CD mock interview and get scored feedback on depth, clarity and confidence.