Recall & Review
beginner
What is a build timeout in Jenkins?
A build timeout in Jenkins is a setting that stops a build if it runs longer than a specified time. This helps save resources and avoid stuck builds.
Click to reveal answer
beginner
How do you set a build timeout in a Jenkins Pipeline script?
You use the
timeout step with a time limit and unit, for example: timeout(time: 10, unit: 'MINUTES') { /* build steps */ }Click to reveal answer
beginner
Why is it important to use build timeouts?
Build timeouts prevent builds from running forever, which can block other jobs and waste server resources. They help keep the CI/CD system healthy and responsive.
Click to reveal answer
beginner
What happens when a Jenkins build times out?
When a build times out, Jenkins stops the build and marks it as failed or aborted. This lets you know the build did not finish in time.
Click to reveal answer
intermediate
Can you customize the timeout behavior in Jenkins?
Yes, Jenkins allows you to customize timeout behavior, such as setting different time limits, choosing to fail or abort the build, and adding messages or cleanup steps.
Click to reveal answer
What is the main purpose of setting a build timeout in Jenkins?
✗ Incorrect
Build timeouts stop builds that run longer than expected, preventing resource waste.
Which Jenkins Pipeline step is used to set a build timeout?
✗ Incorrect
The
timeout step sets a time limit for the build block.What happens if a Jenkins build exceeds the timeout limit?
✗ Incorrect
Jenkins stops the build and marks it as failed or aborted when timeout is reached.
How do you specify the time unit in a Jenkins timeout step?
✗ Incorrect
The 'unit' parameter defines the time unit, for example 'MINUTES' or 'SECONDS'.
Can build timeouts be set differently for each Jenkins job?
✗ Incorrect
Each Jenkins job or pipeline can have its own timeout configuration.
Explain what a build timeout is in Jenkins and why it is useful.
Think about what happens if a build never stops.
You got /4 concepts.
Describe how to set a build timeout in a Jenkins Pipeline script with an example.
Look for a block that limits build time.
You got /3 concepts.