Xcode 6 Bot after integration download .archive file to location

194 views Asked by At

I have a Mac Build Server. In Xcode 6 I have one Bot, who is integrating my project after every commit.

Everything runs fine.

How can I download the archive file with a script triggered from my bot. I want to have the resulting .xcarchive file on a location (e.g. /Users/admin/Desktop/Archives) on my server.

1

There are 1 answers

0
richardpiazza On

In order to copy the resulting .xcarchive file, you will need to add a post-build trigger to your Bot. Once a build is complete and the archive is successful, you have access to the XCS_ARCHIVE environment variable. This will have a path, something similar to:

/Library/Developer/XcodeServer/Integrations/Integration-5fa0beca97c1a3e60628eee97e10a69b/Archive.xcarchive

Use that path to copy the archive to your desired destination. Please note, many of the Xcode Server directories have limited access. You many not be able to access those directories with your current user account, and even sudo-ing may not work.

Additional information about the Xcode Server environment variables can be found here: http://faq.sealedabstract.com/xcodeCI/