I\'m trying to build Unity project with Jenkins on Mac OS Server. But when I try to run the following script
/Applications/Unity/Unity.app/Contents/MacOS/Unity -
You also get this error if the user you are running as is not currently logged in graphically.
Try write from Terminal:
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo mv /Library/LaunchDaemons/org.jenkins-ci.plist /Library/LaunchAgents/org.jenkins-ci.plist
Then log out and log in again.
Now Jenkins will run as agent and can access WindowServer.
I had this same issue. The problem is with how Jenkins and Unity work individually. The only way I could find a cleaner work around was:
Make sure you have -nographics parameter among your startup parameters
I tried
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo mv /Library/LaunchDaemons/org.jenkins-ci.plist /Library/LaunchAgents/org.jenkins-ci.plist
Then Restarted my Mac
And then sudo launchctl load /Library/LaunchAgents/org.jenkins-ci.plist
after restarting
It worked
It looks like you're missing the --projectPath option prior to specifying your project's path?