Pcornel
Automation · Jenkins

Artifacts

Cheat sheet · https://pcornel.dk/topic.php?topic=5545

Back to the Topic

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.

Remember

  • archiveArtifacts keeps files from a build.
  • Use an artifact repository for long-term storage.
  • Set retention to limit disk use.

First checks

  • archiveArtifacts patterns — outputs
  • Artefact repository (Nexus/Artifactory) — storage
  • Build retention (buildDiscarder) — disk usage

Verify in this order

build → artefacts → repository

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Jenkins → Artifacts · operational reference

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

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5545

Confirmation

Confirm action

Continue?