postbuild UIAutomation script not running in jenkins

心不动则不痛 提交于 2019-12-03 05:37:37

Jenkins by default installs as a LaunchDaemon, which means it has insufficient permissions to launch WindowsServer.

You’ll need to configure it as a LaunchAgent:

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo mv /Library/LaunchDaemons/org.jenkins-ci.plist /Library/LaunchAgents/org.jenkins-ci.plist

Then login as Jenkins and keep a session open.

If you don't know the Jenkins password you can change it with:

sudo passwd jenkins

Jenkins is running as a daemon and is therefore not allowed to connect to the window server. More info here http://developer.apple.com/library/mac/#technotes/tn2083/_index.html.

Sorry - not got time to put a complete answer now, will update later....

This is possible if you run jenkins as a user app rather than as a deamon -- this might come in handy (https://github.com/stisti/jenkins-app) I haven't tried it but looks like it should work -- I went down another route setting up an always logged in user, that ran jenkins from a login script, it did mean I had to re-install jenkins but managed to get it up and running... word of warning from someone thats been through it, are you using instruments for automated testing? If so, you'll need to do some transformation on the output so it displays in Jenkins.

Brent Westmoreland

We have a Jenkins Linux instance that builds to a Mac slave over SSH. One interesting requirement that we noticed with this error is that the build user on the slave must be logged into the console in order for everything to work correctly.

In addition, we had to make the build user an Admin, developer permissions were insufficient.

See more info here:

UIAutomation : Failed to authorize rights with status: -60007

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!