0
0
Jenkinsdevops~5 mins

Workspace cleanup in Jenkins - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
ARestarts Jenkins server
BStarts a new build
CSaves workspace files
DDeletes all files in the workspace
Why should you clean the workspace before a build?
ATo avoid conflicts from leftover files
BTo speed up the build by keeping old files
CTo save build logs
DTo backup workspace data
Which Jenkins plugin is commonly used for workspace cleanup?
AGit Plugin
BWorkspace Cleanup Plugin
CDocker Plugin
DEmail Extension Plugin
Where can you enable 'Delete workspace before build starts' in Jenkins?
AIn global Jenkins settings
BIn Jenkins user profile
CIn job configuration settings
DIn Jenkins system logs
What happens if workspace cleanup is skipped?
AOld files may cause build failures
BJenkins server restarts
CBuilds run faster
DWorkspace size decreases
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.