Complete the code to specify the JDK tool in a Jenkins pipeline.
tools {
jdk '[1]'
}The tools directive is used to specify tools like JDK by their configured names in Jenkins. Here, jdk 'JDK11' tells Jenkins to use the JDK named 'JDK11'.
Complete the code to specify Maven tool in a Jenkins pipeline.
tools {
maven '[1]'
}The tools directive can specify Maven by its configured name. Here, maven 'Maven3' tells Jenkins to use the Maven tool named 'Maven3'.
Fix the error in the tools directive to correctly specify NodeJS.
tools {
nodejs '[1]'
}The nodejs tool must be specified by its configured name in Jenkins. Here, nodejs 'NodeJS14' correctly tells Jenkins to use the NodeJS tool named 'NodeJS14'.
Fill both blanks to specify JDK and Maven tools in a Jenkins pipeline.
tools {
jdk '[1]'
maven '[2]'
}This code specifies two tools: jdk 'JDK8' and maven 'Maven3'. Both names must match the configured tools in Jenkins.
Fill all three blanks to specify JDK, Maven, and NodeJS tools in a Jenkins pipeline.
tools {
jdk '[1]'
maven '[2]'
nodejs '[3]'
}This pipeline specifies three tools by their configured names: jdk 'JDK11', maven 'Maven3', and nodejs 'NodeJS14'. Each name must match Jenkins tool configurations.