Skip to content

Artifact

A build artifact is any file produced by the build process — a binary, a JAR, a bundle, a container image, a static site directory — that gets stored in a registry and deployed to an environment.

Definition

What it is

The artifact is what crosses the boundary between "the code" and "the environment". The source code lives in git; the artifact lives in a registry (Harbor, Artifactory, npm registry, Docker Hub, GitHub Packages, S3). The same artifact is deployed to staging, then to canary, then to production — never rebuilt in between.

Artifacts come in many shapes: a .jar (Java), a .whl (Python wheel), a .tgz (npm package), a .war (Java web app), a Docker image (registry.example.com/app:1.2.3@sha256:...), a tarball of a static site, a .deb or .rpm package, an .ipa (iOS), an .apk (Android), a .nupkg (NuGet). The unifying property is: an artifact is a file whose content is the same everywhere it lands.

Why it matters

Without artifacts, deployments rebuild the source at each environment, which means staging and production can run different code even when the source is the same (different compiler versions, different dependency resolutions, different timestamps). With artifacts, the pipeline builds once, signs the artifact, and promotes the exact same bytes through the environments. This is the "build once, deploy many" principle.

Artifact vs source vs package vs image

Aspect

Source

Package

Artifact

Image

Produced by

You

A packager

A build

A container build

Stored in

git

npm/pypi/...

Registry

Registry

Identified by

Commit hash

Name + version

Hash + version

Digest

Typical use

Development

Distribution

Deployment

Containerization

The artifact lifecycle

graph LR
  S[Source] --> B[Build once]
  B --> A[Artifact]
  A --> R[Registry]
  R --> ST[Staging]
  R --> CA[Canary]
  R --> P[Production]
  ST --> D1[Deploy]
  CA --> D2[Deploy]
  P --> D3[Deploy]
  style A fill:#E8F5E9
  style R fill:#FFF3E0

How to build artifacts that age well

Artifacts that age well

  1. Build once, deploy many

    Build in CI, promote the same artifact through staging → canary → production. Never rebuild for a different environment.

  2. Sign the artifact

    GPG, cosign, or platform-specific signing. A signed artifact can be verified before deploy; an unsigned one is a black box.

  3. Version by content, not by tag

    Tags move (latest); digests do not. app@sha256:abc... is immutable; app:latest is not.

  4. Keep immutability

    A registry that allows overwriting an artifact is a registry that cannot be audited. Make artifacts immutable at the registry level.

  5. Prune old artifacts

    A registry that keeps every artifact forever becomes huge and slow. Retention policies matter.

Common failures

Origin

The word comes from Latin: arte + factum, "made with skill". In the 1820s, archaeologists adopted it to describe objects made or shaped by humans (an arrowhead, a pot, a tool) as distinct from natural objects. In the 1990s, software engineering borrowed it for files produced by a build process — the "handmade" objects of the pipeline. The metaphor is exact: an artifact is something a process created, not something that occurred naturally.

An artifact is an immutable file produced by a build, stored in a registry, and deployed to an environment without being rebuilt.

— JFrog, *Artifacts 101*, 2024 (paraphrase)
1820s · "artifact" en arqueología (objeto hecho por humanos)
1990s · software engineering adopta el término
2000 · Maven Central formaliza repositorios de artefactos
2013 · Docker Registry estandariza imágenes
2015 · OCI define el estándar de imagen

Evidence

FAQ

Artifact vs source?

Source is what you edit; artifact is what runs. The same source can produce different artifacts if the toolchain differs.

Why sign artifacts?

To prove they came from your CI and were not tampered with. Unsigned artifacts are trust-by-hope.

Should I rebuild for production?

No. Build once, deploy the same artifact everywhere.

What is an immutable artifact?

One that cannot be overwritten in the registry. Every build produces a new digest.

Connections

Etymology

Origin: borrowed

  • arte (noun): Latin ablative of ars, "skill"
  • factum (verb): Latin, "made"

Semantic network

Artifactdevopssoftware-eBuildDeployRegistryContainerDigest

● broader ● narrower ● related

Broader

  • devops
  • software-engineering

Related

Used in the garden

Sources