Challenge - 5 Problems
Disk Space Mastery in Jenkins
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Jenkins Disk Usage Plugin: Output Interpretation
You run the Jenkins Disk Usage plugin report on a Jenkins master node. The output shows:
What is the total disk space used by this Jenkins job?
Workspace: 5 GB
Builds: 10 GB
Artifacts: 3 GB
Other: 2 GBWhat is the total disk space used by this Jenkins job?
Attempts:
2 left
💡 Hint
Add all the categories shown in the report to find total usage.
✗ Incorrect
The total disk space is the sum of Workspace (5 GB), Builds (10 GB), Artifacts (3 GB), and Other (2 GB), which equals 20 GB.
🔀 Workflow
intermediate1:30remaining
Jenkins Pipeline: Clean Workspace Step Placement
In a Jenkins pipeline, you want to clean the workspace to free disk space before starting a new build. Where should you place the
cleanWs() step to ensure the workspace is cleaned at the right time?Attempts:
2 left
💡 Hint
Think about when you want to remove old files to avoid interference.
✗ Incorrect
Cleaning the workspace at the start ensures no leftover files from previous builds affect the current build and frees disk space before building.
❓ Troubleshoot
advanced2:00remaining
Jenkins Disk Space Warning: Cause Identification
A Jenkins master node shows a disk space warning despite regular workspace cleaning. Which of the following is the most likely cause?
Attempts:
2 left
💡 Hint
Think about what files remain even after workspace cleaning.
✗ Incorrect
Build artifacts can accumulate if not deleted after their retention period, causing disk space warnings even if workspaces are cleaned.
❓ Configuration
advanced2:00remaining
Configuring Jenkins to Automatically Clean Old Builds
Which configuration snippet in a Jenkins pipeline script will automatically discard builds older than 10 days and keep only the last 5 builds to save disk space?
Attempts:
2 left
💡 Hint
Check the parameter types and whether they expect strings or integers.
✗ Incorrect
The correct syntax uses integer values for daysToKeep and numToKeep parameters inside logRotator.
✅ Best Practice
expert2:30remaining
Best Practice for Managing Disk Space on Jenkins Agents
Which of the following is the best practice to manage disk space on Jenkins agents to avoid build failures due to full disks?
Attempts:
2 left
💡 Hint
Think about sustainable ways to keep disk space free over time.
✗ Incorrect
Regular cleanup jobs on agents prevent disk space from filling up and avoid build failures, which is a sustainable best practice.