How does the Jenkins Global tools works under the hood.
If we configure a maven tool in Jenkins Global tools, will it download and install maven in all the agent nodes or downloads and install only on the agent where we are running the maven build command.
ex- 1 master node and 2 agent node
pipeline {
tools {
maven 'maven-3.6.3'
}
stages {
stage ('Build') {
agent{ label 'agent-1' }
steps {
sh 'mvn clean package'
}
}
}
}
1.Will the maven be installed on all the nodes or only on agent-2?
2. After the pipeline completes will the Jenkins uninstall the maven from the nodes?