Build error on Linux: Couldn't locate Gradle installation
All, I'm new to TeamCity and I'm trying to configure a Build Agent on Linux to run Gradle build scripts. I've already configured TeamCity on a Windows VM, along with a build agent. I'm able to build my projects successfully using Gradle.
I’m now trying to configure a build agent on Linux.
- I installed the build agent on Linux using the Agent Push--Install agent command.
- I used the custom settings to install and accepted the default install folder as "$HOME/BuildAgent".
- I've started the agent on linux (under my user account) and was able to authorize the agent from the TeamCity server.
- I installed Gradle and set the GRADLE_HOME=/data/gradle and PATH=/data/gradle-1.8/bin
However, when I try to compile the project, I get this error--
Couldn't locate Gradle installation. Please use wrapper script or install Gradle and set environment variable GRADLE_HOME
I've confirmed that GRADLE_HOME is set for the correct directory for my user, and the Build Agent is running under my user account. I'm also able to run gradle -v.
Any ideas/suggestions of where the problem might lie would be appreciated (Disclaimer: I'm a Linux novice). Thanks!
Please sign in to leave a comment.
More info: Using TeamCity Professional 8.0.4 (build 27616)
Darrell,
First, please restart the build agent so that it pics up new environment variables
If this does not help, please create a build configuration (without any vcs roots) with a sing command line build step. Add following command:
echo $GRADLE_HOME
and run this build configuration on the linux agent
also, as a workaround, I can suggest to use Gradle Wrapper
Nikita-- We configured the build for with a gradle wrapper and
it now builds. Thanks for the support!