Build artifact

What it is

A build artifact is the packaged output of a pipeline — compiled binaries, packages, or files — published by a build job and consumed by later jobs or a release/deployment.

Why it exists

CI produces things (DLLs, containers, npm/yarn packages) that other jobs or CD stages need. Artifacts hand those outputs between jobs (which may run on different agents) and into releases, decoupling “build” from “consume”.

Key ideas

  • Azure Pipelines
    • Publish with the PublishPipelineArtifact / PublishBuildArtifact task (or - task YAML) from a job.
    • Download with DownloadPipelineArtifact or via download in a later job/release.
    • The build artifact is a key input to classic release pipelines.
  • GitHub Actions
    • actions/upload-artifact uploads; actions/download-artifact retrieves in later jobs.
  • Artifacts differ from packages (NuGet, npm in Azure Artifacts) — artifacts are raw build output, packages are versioned feeds.

Exam notes

  • “Publish artifacts” is required when a later job or a release pipeline needs build output.
  • In GitHub Actions use actions/upload-artifact/download-artifact to share between jobs.
  • Artifacts are per-run; they persist for the run and into associated releases.

azure-pipelines · github-actions · jobs-steps

📘 Source: Microsoft Learn — Build Artifact