Complete the code to set a build timeout of 10 minutes in a Jenkins pipeline.
timeout(time: [1], unit: 'MINUTES') { // build steps }
The timeout step requires the time value in minutes. Setting it to 10 means the build will stop if it runs longer than 10 minutes.
Complete the code to set a build timeout using the 'timeout' step with a unit of 'SECONDS'.
timeout(time: [1], unit: 'SECONDS') { // build steps }
Setting the timeout to 60 seconds means the build will be stopped if it runs longer than 1 minute.
Fix the error in the timeout step by completing the missing unit value.
timeout(time: 5, unit: '[1]') { // build steps }
The unit must be one of the supported strings. 'MINUTES' is the correct unit for a 5-minute timeout.
Fill both blanks to set a timeout of 2 hours using the Jenkins pipeline syntax.
timeout(time: [1], unit: '[2]') { // build steps }
Setting time to 2 and unit to 'HOURS' means the build will timeout after 2 hours.
Fill all three blanks to create a timeout block that stops the build after 90 minutes.
timeout(time: [1], unit: '[2]') { echo '[3]' }
The timeout is set to 90 minutes, and the echo message informs that the build timed out after 90 minutes.