As others have noted, this is because Jenkins cannot find the gradle executable.
None of the published solutions worked for me, but I was able to fix this problem by adding the gradle dir directory to the path set in .bashrc for the build account on the slave assembly. Failed to modify .profile file and also set PATH in jenkins node configuration.
Some posts will suggest setting the gradle path in the tool menu, but there was no gradle entry there (perhaps due to regression / design changes in the gradle plugin?).
In any case, the best test I found (with the exception of running the build and viewing the failure) was to run env on ssh:
ssh <host> env
and check the PATH variable so specified; if gradle is not in this path, you probably cannot start it from jenkins.
rcreswick Feb 26 '14 at 5:04 2014-02-26 05:04
source share