how to run applescript from Jenkins?

543 views
Skip to first unread message

David Burson

unread,
May 24, 2013, 4:13:27 PM5/24/13
to jenkins...@googlegroups.com
Hi,

I've spent a couple days now trying to figure out why our build script runs fine from the command line, but gets "execution error: An error of type -10810 has occurred. (-10810)" when Jenkins runs it.  The problem is a bit of Applescript we run towards the end of our script.

When I simply put this line in Jenkins' Execute shell Command box:
osascript -e 'tell application "Finder" to activate'
I get the same error: 
execution error: An error of type -10810 has occurred. (-10810)
 
How can I get Jenkins to run a bit of Applescript?

Thanks,
David

Pete Akey

unread,
May 28, 2013, 8:54:44 AM5/28/13
to jenkins...@googlegroups.com
I would print all of your environment variables from the command line as your jenkins user, then print them all from "bash shell" within jenkins and compare the two.  They should be different because of the JVM versus the bash environment.

From CLI:  comm -3 <(declare | sort) <(declare -f | sort)

From Jenkins "execute shell command box", run the same command and see if a comparison of the two brings anything to light.  Then, force a change of any values as you see fit.

Keep in mind, changing any of the values may have undesirable consequences so proceed with caution.

Hope it helps,
Pete


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

David Burson

unread,
May 31, 2013, 2:00:36 PM5/31/13
to jenkins...@googlegroups.com
Hi Pete,

When I run:  comm -3 <(declare | sort) <(declare -f | sort)
from a terminal, it works fine, but when I run it from Jenkins' Execute shell Command, I get:  syntax error near unexpected token `('

I looked at the man page for comm and I'm still lost.  Any ideas?

Thanks,
David

Pete Akey

unread,
May 31, 2013, 2:35:06 PM5/31/13
to david....@gmail.com, jenkins...@googlegroups.com
That's disappointing.  I just tried it again on my install and it works just fine.

Try the ol' printenv command instead.  They both work for me.

Pete

Reply all
Reply to author
Forward
0 new messages