Automation · Jenkins
Artifacts
Cheat sheet · https://pcornel.dk/topic.php?topic=5545
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
| Layer | Jenkins → Artifacts operational reference |
|---|---|
| Runtime/ownership | Jenkins Pipeline artifacts · identify controller/parser, durable intent, identity and target ownership before mutation |
| Persistent intent | Versioned definition/configuration with explicit dependencies, scope and credential boundary |
| Verification | Run a fixture build with archiveArtifacts artifacts: 'build/**', fingerprint: true; verify archived files, checksums/fingerprint and build provenance. |
| Expected interpretation | The 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 boundary | Preserve 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