2

I erroneously thought selecting "Cleaning: Always" in the "Schedule" tab of an Xcode bot configuration would force the bot to rm -rf its checkouts directory at the start of every integration, but this does not appear to be the case.

(Specifically, non-tracked files that were copied into the checkout dir by a Run Script phase persist between integrations.)

Is there any way to force a bot to always nuke its checkout directory and do a clean checkout from source control every time?

Is it even possible to force Xcode (Server?) to show me where the checkout directory is? (I know it's hidden in the bowels of /Library/Developer/XcodeServer/Integrations/ somewhere, but I can't see into those directories as a normal user because of their permissions. I'm thinking of a "Show in Finder" menu option or the like.)

Robert Atkins
  • 23,528
  • 15
  • 68
  • 97
  • For my future reference, the built products (`.xcarchive` et al) are in `/Library/Developer/XcodeServer/IntegrationAssets/`. – Robert Atkins Dec 11 '15 at 10:15

1 Answers1

0

You can add a Trigger to the Bot in the bot settings to achieve this.

In your local XCode select your bot, right click "Edit Bot...", triggers, and then + Add Trigger in the "Before Integration" section.

Adriano
  • 482
  • 5
  • 18
  • And what should the trigger do? `rm -rf $XCS_SOURCE_DIR`? That strikes me as a bit brave. Have you tried it? – Robert Atkins Jan 05 '16 at 16:28
  • I just tried it, it doesn't really do what I want. It did seem to nuke the checkouts dir when I first ran it, but then that integration failed immediately afterward. Subsequently removing the trigger and integrating again appears to be re-attempting the build with a fresh checkout. – Robert Atkins Jan 13 '16 at 10:28