System : win10-ver2004
Unity : 2020.1f1/2019.4
Jenkins : 2.222.1
I use Jenkins to do some CI job for my project, the Jenkins will run a powershell script, and the powershell script will run unity in batchmode and execute a static method to build the project.
The problem is, if I run the script manually, everything works fine, but if I run from Jenkins, the build will fail.
The build log shows Unity can’t find JDK path, but I set JDK path manually, and it works fine when building manually.
I successfully reproduce this with an empty new project, so the problem is not inside my project.
I know it’s probably a Jenkins problem(bug or wrong config), but I don’t understand why it stops unity from getting the correct path(in Windows registry).