I have a Jenkins setup on a linux machine (CentOS) and I tried to build a Gradle based project on the main host. My project uses StashGit repository as SCM.
In the Jenkins build job, I turned on the option Clean before checkout. And I see that the gradlewscript is being tested without executable permissions. So, I checked the box Make gradlew executablefor the task. But I still see the problem:
java.io.IOException: Cannot run program "/project/dir/gradlew" (in directory "/project/dir/"): error=13, Permission denied
I checked permissions gradlewand there is no executable for the file.
Does anyone know how to debug / configure it?
Now I have to use an additional build step execute shell scriptto set the executable permissions for gradlew.
Note 1: I am using Use Gradle Wrapperthe build option instead Invoke Gradlebecause of some suggestions I found on the Internet.
Note 2: I found the gradlew script to make an executable file and verified that my Jenkins build should contain this fix. I am using Jenkins build 1.581
source
share