Artifact Management

💤0
Lv 10 XP
← 🔁 CI/CD & DevOps · Delivery & Releases

Artifact Management

Intermediate ⭐ 80 XP ⏱ 15 min #cicd#artifacts#registry

Store, version, and promote build outputs through environments reliably.

📖Theory

An artifact is the packaged output of a build — a container image, a .jar, an npm package, a zip. An artifact repository (Artifactory, Nexus, GitHub Packages, container registries) stores them with versioning and access control.

The core principle: build once, promote the same artifact through dev → staging → prod. Rebuilding per environment risks subtle differences. Tag artifacts immutably (semantic versions or commit SHAs), record provenance, and scan them for vulnerabilities before promotion.

🌍Real-World Example
# Build once, tag immutably by version + commit
docker build -t registry.example.com/app:1.4.2 .
docker push registry.example.com/app:1.4.2

# Promote the SAME image through environments (retag, don't rebuild)
docker tag  registry.example.com/app:1.4.2 registry.example.com/app:staging
docker tag  registry.example.com/app:1.4.2 registry.example.com/app:prod
✍️Hands-On Exercise
  1. Explain why you should build an artifact once and promote it.
  2. Choose a tagging scheme that supports reliable rollbacks.
  3. Describe where vulnerability scanning fits in the artifact lifecycle.
  4. Name three types of artifacts and a repository that stores each.
🧾Cheat Sheet
ConceptDetail
ArtifactPackaged build output
Artifact repoArtifactory, Nexus, registries
Build oncePromote same artifact
Immutable tagsVersions / commit SHAs
ProvenanceTrack what built it
ScanCheck CVEs before promotion
💬Common Interview Questions
Why build an artifact once and promote it across environments?

So the exact thing you tested is what reaches production. Rebuilding per environment can introduce differences, meaning you’d deploy something you never validated.

What is an artifact repository?

A versioned store for build outputs (images, packages, binaries) with access control, retention, and scanning — the source of truth for what gets deployed.

📚Official Documentation

📝 My notes on this topic

Auto-saves as you type