I have a Jenkins instance running that should build an Android project. When I start the task, I receive the following exception:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory()
Failed to create parent directory '/home/espresso/jenkins_workspace/workspace/myproject/.gradle' when creating directory '/home/espresso/jenkins_workspace/workspace/myproject/.gradle/4.1/fileHashes'
Jenkins runs as root, ls -la for myproject folder is:
drwxr-xr-x 11 root root 4096 Nov 16 15:07 myproject
The environment variable GRADLE_USER_HOME is set to /home/espresso/.gradle, ls -la for that folder gives:
drwxrwxrwx 6 root root 4096 Nov 16 11:30 .gradle
Why can't Jenkins create that folder? The whole directory structure under jenkins_workspace was created by Jenkins, so the permissions should be okay?