Recall & Review
beginner
What is workspace cleanup in Jenkins?
Workspace cleanup is the process of removing files and folders from the Jenkins job workspace to ensure a clean environment for new builds.
Click to reveal answer
beginner
Why is workspace cleanup important in Jenkins?
It prevents old files from interfering with new builds, saves disk space, and avoids build errors caused by leftover data.
Click to reveal answer
intermediate
Which Jenkins plugin helps automate workspace cleanup?
The 'Workspace Cleanup Plugin' helps automate cleaning the workspace before or after a build.
Click to reveal answer
intermediate
How do you configure workspace cleanup in a Jenkins Pipeline script?
Use the 'cleanWs()' step inside the pipeline script to delete workspace files before or after build steps.
Click to reveal answer
beginner
What is the effect of adding 'Delete workspace before build starts' in Jenkins job settings?
It removes all files in the workspace before the build runs, ensuring a fresh start for the build process.
Click to reveal answer
What does the 'cleanWs()' step do in a Jenkins Pipeline?
✗ Incorrect
The 'cleanWs()' step deletes all files in the workspace to clean it.
Why should you clean the workspace before a build?
✗ Incorrect
Cleaning avoids conflicts caused by leftover files from previous builds.
Which Jenkins plugin is commonly used for workspace cleanup?
✗ Incorrect
The Workspace Cleanup Plugin automates cleaning workspace files.
Where can you enable 'Delete workspace before build starts' in Jenkins?
✗ Incorrect
This option is set in the job's configuration page.
What happens if workspace cleanup is skipped?
✗ Incorrect
Skipping cleanup can cause build errors due to leftover files.
Explain how workspace cleanup improves Jenkins build reliability.
Think about what leftover files can do to a new build.
You got /4 concepts.
Describe how to implement workspace cleanup in a Jenkins Pipeline script.
Focus on the pipeline syntax and plugin needed.
You got /3 concepts.