Using the following Jenkins Groovy script, observing Could not create parent directory for lock file /home/ubuntu/.gradle/.../gradle-6.7.1-all.zip.lck error
stage('Run build'){
steps {
sh "./gradlew --update-locks assembleDebug"
sh "./gradlew -DinputParam=${PARAM} --info clean test"
}
}
This build was working in the past, but now causing this lock file issue. Reading this post, added the --update-locks assembleDebug step, still the issue is not resolved.
Please advice what is the best approach to have a clean gradle build and to fix this runtime issue.