Reputation: 16287
On an ubuntu jenkins master I have configured that gradle should be autoinstalled to:
GRADLE_HOME: /var/jenkins/tools/mygradle
As a result gradle is installed here on all ubuntu slaves:
/var/jenkins/tools/mygradle/bin/gradle
This works fine and my gradle jobs builds on the slave nodes.
Now I need to call a .sh script (Build step - Execute shell) in a job. At some point the script calls gradle and therefore requires that its in the PATH. But when I execute the job (on one of the build slaves) gradle cannot be found.
Is it possible to auto install gradle on all slaves and ALSO add gradle to the PATH on all slaves?
All slaves are launched using Launch slave agents on unix Machines via SSH
Upvotes: 1
Views: 891
Reputation: 16287
This works:
https://wiki.jenkins-ci.org/display/JENKINS/Tool+Environment+Plugin
at least for now. The downside is that it must be configured for each job.
Upvotes: 1