3
votes

I setup a Xcode6 server and bots following the iOS document.

The bot is connected to the Bitbucket git with provided username and password. I didn't have any problem syncing down the latest code.

Then I setup the following trigger script for the "Before Integration" like the following:

cd /Users/seagull/workspace/develop ---> Source root

pod install

Then this fails with error messages such as _xcsbuildd doesn't have a write permission to "mkdir Pods" in the trigger section of the log:

I suppose xcode bot is using the linux user _xcsbuildd (which is the xcode bot). However, since the code is checked out with the current user, _xcsbuildd doesn't have a write permission to create "Pods" directory or "Podfile.lock" or to add Pods.xcproject file within the project folder.

I also used 'chmod' to give all-user write permission to all folders, but Xcode gets angry saying that I shouldn't unlock the write permission. How should I address this permission issues? Is there anyway I can force xcode bot to acts as current user? not _xcsbuildd? (I identified _xcsbuildd as the current user by adding 'whoami' in the trigger script for testing).

2
Did you ever figure this out? I am dealing with a similar issue trying to run calabash automation tests in an "After Integration" trigger script and getting similar permissions issues. - Jamie Forrest
Nah, I gave up and started using Jenkins. I guess XCode Server is not yet ready for the prime time. - seattlesegull
same damn problem here! for every command, I've looked for the _xcsbuildd user but i'm not able to find that user in "passwd", still looking for a solution - Kappe

2 Answers

2
votes

Then I setup the following trigger script for the "Before Integration" like the following:

cd /Users/seagull/workspace/develop ---> Source root

pod install

Your source root will be created by _xcsbuildd and will be at /Library/Developer/XcodeServer/Integrations/Caches/{integrationID}/Source/{repo name}

Your bot will be at the Source folder, so if you had a repo named 'myApp' with the Podfile in the first level:

cd myApp
pod install

Here's a reference to Bots' CI variables- Access build folder in Xcode Server CI bot run (env variables?)

0
votes

I think I was having the same issues as you. I've just got it working with Xcode 7. Check out my question / answer here where I link to the tutorial I followed and the solution to my issue: Xcode CI and cocoapods private repo