Interview Prep/CI/CD/Jenkins in Production

How do you avoid disk space exhaustion on Jenkins?

BeginnerProductionJenkins in Production
Answer

On the controller: buildDiscarder on every job (keep N builds, fewer artifacts), the Disk Usage or Prometheus metrics for monitoring, and externalise artifacts to Nexus/S3. On agents: cleanWs() after builds, a periodic docker system prune -af --filter "until=72h" cron, and ephemeral agents that vanish with their disks. Alert at 80% disk, since a full JENKINS_HOME can corrupt build records.

All CI/CD questions

More on Jenkins in Production