Artifact and Package Management

Store, version, promote and clean up the build outputs your pipelines produce: images, packages, binaries and charts.

Intermediate · about 4 hours · difficulty 2/5

Learn first: Continuous Integration and Delivery, Container Registries

A pipeline's output is an artifact: a container image, a JAR, a wheel, an npm package, a Helm chart, a static bundle or a binary. Where and how you store artifacts decides whether you can reproduce, roll back and audit releases.

Repositories

  • Container registries: ECR, GCR/Artifact Registry, ACR, GHCR, Harbor.
  • Universal repository managers: JFrog Artifactory and Sonatype Nexus host many formats (Maven, npm, PyPI, Docker, Helm, generic).
  • Cloud package services: AWS CodeArtifact, Google Artifact Registry, Azure Artifacts, GitHub Packages.
  • Proxy / remote repositories cache public registries such as npm and Docker Hub so builds survive upstream outages and rate limits.

Versioning

  • Tag with something immutable: semantic versions for libraries, commit SHA or build number for services. Treat latest as a convenience, never as a deploy target.
  • Deploy container images by digest (image@sha256:...) when you need a guarantee.
  • Make tags immutable in the registry so nobody can overwrite a release.

Promotion and retention

Promote the same artifact through repositories or tags (dev, staging, prod) rather than rebuilding. Attach metadata: commit, pipeline run, test results, SBOM and signature. Set retention policies to delete untagged images and old snapshots, or storage bills climb silently.

Good enough to move on: you can set up a registry with immutable tags and a cleanup policy, configure a proxy cache for a public package ecosystem, and trace a running image back to the commit and pipeline run that built it.

Key concepts

  • Artifact types and formats
  • Artifactory and Nexus
  • Proxy caches for public registries
  • Semantic versioning and SHA tags
  • Immutable tags and digests
  • Promotion between environments
  • Retention and cleanup policies

Mini project

Run Nexus or Artifactory locally, configure a proxy for npm or PyPI and a hosted Docker repository, point a CI build at it, and add a cleanup rule for untagged images.

Check yourself

Two deploys used the image tag app:1.4 but behaved differently. How could that happen, and how do digests prevent it?

Free resources