I am trying to set up a CI environment for an iOS application. So far, I got xcodebuild for building the test build correctly from the command line, but when Jenkins tries to execute it, I get the following reading in the console:
Started by user anonymous Building in workspace /Users/Shared/Jenkins/Home/jobs/Unit Tests/workspace Working directory is /Users/iosappdev/Documents/Xcode Projects/rules. [rules] $ /usr/bin/xcodebuild -version FATAL: Cannot run program "/usr/bin/xcodebuild" (in directory "/Users/iosappdev/Documents/Xcode Projects/rules"): error=13, Permission denied java.io.IOException: Cannot run program "/usr/bin/xcodebuild" (in directory "/Users/iosappdev/Documents/Xcode Projects/rules"): error=13, Permission denied at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:707) at hudson.Launcher$ProcStarter.start(Launcher.java:338) at hudson.Launcher$ProcStarter.join(Launcher.java:345) at au.com.rayh.XCodeBuilder.perform(XCodeBuilder.java:224)
Any thoughts? I'm new to Jenkins, but I did my best to answer this question using Google Fu. I initially ran into this problem with manually installing Jenkins (at home), but recently used the OSX installer, and this led to the same error.
I assume this has more to do with Unix / Linux / OSX permissions than Jenkins / Xcode, but not enough experience to determine this for sure.
Edit
Project directory permissions are set to 775.
I also tried changing the ownership of the Jenkins user.
Here's the output for when I tried to run xcodebuild as a daemon user ($ sudo -u daemon xcodebuild):
dev-imac:rules iosappdev$ sudo -u daemon xcodebuild shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied 2012-03-21 11:05:46.161 xcodebuild[1411:70b] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-1196/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/Xcode3Model/Xcode3Project.m:266 Details: Assertion failed: [directoryPath isAbsolutePath] Object: <Xcode3Project> Method: +projectFilesInDirectory: Thread: <NSThread: 0x40010a260>{name = (null), num = 1} Hints: None Backtrace: 0 0x000000010025b85f -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DVTFoundation) 1 0x000000010025b6b5 _DVTAssertionFailureHandler (in DVTFoundation) 2 0x00000001011559bc +[Xcode3Project projectFilesInDirectory:] (in DevToolsCore) 3 0x00000001008a424b -[Xcode3CommandLineBuildTool _resolveInputOptions] (in Xcode3Core) 4 0x00000001008aa097 -[Xcode3CommandLineBuildTool run] (in Xcode3Core) 5 0x00000001001d7db6 (in xcodebuild) 6 0x00000001001d7c2c (in xcodebuild)
ios continuous-integration jenkins xcodebuild
cesarislaw
source share