Skip to content

Artifact

In one line

An artifact is a file or set of files produced by a build pipeline, such as a binary, package, or Docker image.

In simple words

An artifact is the output of a build process — it is the packaged, deployable result. Common examples include a compiled binary, a .jar file, a .zip archive, a Node.js package, or a Docker image.

Artifacts are stored in an artifact repository (like Nexus, Artifactory, or a container registry) so they can be versioned, shared, and deployed. Each artifact is tagged with a version number, so you know exactly which code produced it.

The key idea is that the build step produces an artifact once, and the same artifact is deployed to all environments (dev, staging, prod). This ensures that what you tested is exactly what you deploy — no rebuilding for each environment.

Example

bash
# Build produces an artifact (Docker image)
docker build -t myapp:1.2.3 .

# Push to a registry (artifact storage)
docker push registry.example.com/myapp:1.2.3

# Deploy the same artifact to production
kubectl set image deployment/myapp myapp=registry.example.com/myapp:1.2.3

Build the image once, push it to a registry as an artifact, then deploy the exact same artifact to production.

How it works

  1. The build stage compiles and packages your code into an artifact.
  2. The artifact is versioned (e.g., 1.2.3) and stored in a registry.
  3. The deploy stage pulls the same artifact and deploys it.
  4. The same artifact is promoted across environments without rebuilding.

Common confusions

  • Confused with: Image

    The difference: An image is a specific type of artifact (a container image); artifacts also include binaries, packages, and archives.

Related terms

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary