3

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).

  • 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 Feb 19 '15 at 16:57
  • Nah, I gave up and started using Jenkins. I guess XCode Server is not yet ready for the prime time. – seattlesegull Feb 23 '15 at 02:20
  • 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 Aug 18 '15 at 11:31

2 Answers2

2

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?)

Community
  • 1
  • 1
BeauJest
  • 51
  • 3
  • Did you have to do anything special during initial setup so that the _xcsbuildd user had access to the "pod" command? When and how did you run the initial "pod setup" command? I'm getting errors at that point – Andy Obusek Jul 09 '15 at 15:56
0

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

Community
  • 1
  • 1
Simon McLoughlin
  • 8,293
  • 5
  • 32
  • 56