Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Artifacts · Jenkins

Direct answer

Jenkins artifacts are files kept from a build, saved with archiveArtifacts, such as packages or reports. Store long-term artifacts in a repository like Nexus or Artifactory instead.

When to use this

Use this when keeping build outputs in Jenkins.

First 30 seconds

1. Artefacts are build outputs.

2. Archive or publish to repository.

3. Retention to save disk.

4. Fingerprints for traceability.

5. No secrets.

Operational verification

build → artefacts → repository

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Jenkins Pipeline artifacts
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformJenkins Pipeline artifacts · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when keeping build outputs in Jenkins.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

Run a controlled build that produces known files and checksums, archive using the production pattern, and confirm expected files are present while excluded files are absent. Test the empty-artifact behavior and retention expectations. Download or fetch the archived artifact by build ID and compare hash/content, then trace the build to its source revision.

Step 2 Common mistakes Narrow the fault
  • Artefacts not archived or fingerprinted.
Step 3 Where it fails Narrow the fault

Separate build generation, workspace paths/glob expansion, Jenkins archive step, controller/storage retention and downstream consumer retrieval. Missing artifacts can come from a build that never created them, a bad pattern, retention cleanup or storage failure. Do not set allowEmptyArchive merely to turn a missing required deliverable green; show whether the artifact is optional first.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • archiveArtifacts keeps files from a build.
  • Use an artifact repository for long-term storage.
  • Set retention to limit disk use.
Key checks
  • archiveArtifacts patterns — outputs
  • Artefact repository (Nexus/Artifactory) — storage
  • Build retention (buildDiscarder) — disk usage
ReferenceWhy it matters1 section · depth on demand

In depth

Jenkins artifacts are files archived from a build — reports, packages, rendered configurations, logs — kept with the build record for download or for later jobs. Fingerprinting tracks which builds produced and used each file.

post {
  always {
    archiveArtifacts artifacts: 'build/**/*.cfg, reports/*.html', fingerprint: true, allowEmptyArchive: true
    junit 'reports/junit.xml'
  }
}

Artifacts are stored on the controller by default and fill its disk quickly; use buildDiscarder to limit retention, and an artifact manager plugin (S3, Azure) or a repository manager (Nexus, Artifactory) for large or long-lived artifacts. Copy artifacts between jobs with the Copy Artifact plugin or stash/unstash within one pipeline.

ReferenceImportant terms & boundaries1 section · depth on demand

Mechanics

Jenkins artifacts are files retained from a build for later download or consumption. The archive pattern is evaluated relative to the workspace, build retention controls availability, and optional fingerprinting helps track artifact usage. Artifacts are not the same as short-lived stashes, caches or external repository packages. A successful build can archive the wrong files if glob patterns or workspace paths are incorrect.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Lifecycle

Define which outputs are build artifacts, how long Jenkins retains them, whether an external artifact repository becomes authoritative, and whether fingerprints/checksums are required. Keep archive patterns reviewed with build layout changes and avoid retaining secrets or huge transient directories. Promotion should refer to immutable build/artifact identity rather than rebuilding from the same branch.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docJenkins Pipeline artifacts current

Authoritative/upstream documentation reviewed for bounded claims in Jenkins > Artifacts. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.jenkins.io/doc/pipeline/tour/tests-and-artifacts/ · confidence 94%
Embedded reference data

Quick lookup tables

Jenkins → Artifacts · operational reference

Context-specific ownership, verification, output and failure-boundary lookup for Jenkins → Artifacts.

LayerJenkins → Artifacts operational reference
Runtime/ownershipJenkins Pipeline artifacts · identify controller/parser, durable intent, identity and target ownership before mutation
Persistent intentVersioned definition/configuration with explicit dependencies, scope and credential boundary
VerificationRun a fixture build with archiveArtifacts artifacts: 'build/**', fingerprint: true; verify archived files, checksums/fingerprint and build provenance.
Expected interpretationThe intended files are archived from the expected workspace/build, empty/unexpected patterns fail as policy requires, and consumers can trace artifacts back to the exact build and source revision.
Recovery boundaryPreserve correlation IDs + pre-state, repair first failing boundary, then verify the target independently
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

Capture Jenkins job/build ID, source revision, workspace-relative artifact path, size, checksum/fingerprint, archive result and retention/promotion destination. A log line saying “archived” is weaker than enumerating the actual retained files. Distinguish archived artifacts from stashes, test reports and external repository uploads.

Confirmation

Confirm action

Continue?