In plain words
A build artifact is what a build produces, such as a compiled bundle, a Docker image or a zip file, stored under a version so the exact thing you tested is the thing you deploy.
Where you see it
Harbor's pipeline builds a Docker image once, tags it with the commit id, pushes it to a registry and deploys that same image to staging and then production. In GitHub Actions, files saved with actions/upload-artifact appear as downloads on the run's summary page.
What goes wrong
- Rebuilding for each environment
A second build from the same commit can pick up a newer base image or a different build setting, so what you tested isn't what you ship. Build once and promote the same artifact.
- Tagging everything latest
latest moves every time you push, so you can't tell which code is running or go back to the image before it. Tag with the commit id or version and deploy that tag.
docker push ghcr.io/harbor/web:latest - Settings baked in at build time
Next.js copies NEXT_PUBLIC_ variables into the browser bundle during next build, so an artifact built with staging's values shows staging's values in production. Read per-environment settings at runtime, or build per environment on purpose.
What to tell your agent
Quick check
Sign in to earn +10 XP for itStaging passed every check, then production was rebuilt from the same commit and broke. What's the most likely cause?