About Continuous Integration in Xcode
Continuous integration in Xcode allows you to catch problems quickly and easily, enhance collaboration with your team, broaden test coverage, generate build and test statistics over time, and distribute builds to your team members. Xcode supports a continuous integration workflow using Xcode Server. Xcode Server is a service provided by OS X Server that automates the integration process of building, analyzing, testing, and archiving your Mac and iOS apps. From your development Mac, you create bots that run on a server, typically a separate Mac, where they perform these integrations. Bots help ensure that your project is always in a releasable state—and when there’s a failure, Xcode Server notifies you or the person whose code change caused the failure. The goal of continuous integration is to improve software quality.
At a Glance
Follow the steps outlined in this document to set up a continuous integration workflow using Xcode Server.
Install and Set Up Xcode Server
The first step in implementing a continuous integration workflow is to install and configure Xcode Server to perform your integrations. Even if you’ve never set up a server before, you’ll find the process for setting up OS X Server and enabling Xcode Server to be straightforward.
Connect Xcode Server to Source Code Repositories
For bots to perform integrations of projects in Xcode Server, the bots must have access to the projects’ source code repositories. Xcode Server supports two popular source control systems: Git and Subversion. You can use Git and Subversion repositories hosted on remote servers, or you can host and use Git repositories on the server running Xcode Server.
Create and Run Bots
Bots are at the center of Xcode Server’s automated workflow. Bots build and test your projects with the schemes you specify. Since Xcode Server can access the source code repositories of your projects, you can create and schedule bots to run periodically, on every source code commit, or manually. You can also configure bots to send email notification of the success or failure of their integrations. Xcode Server also allows your bots to conduct performance testing and initiate pre- and postintegration triggers.
Monitor and Manage Bots
From the report navigator in Xcode on the development Mac, you can manage bots, view their test results, read integration logs, initiate or cancel integrations, and download product archives. Xcode Server also hosts a bots website, where you and members of your development team can view the status of bot integrations and download assets and products.
With OS X Server, small organizations and workgroups without an IT department can take full advantage of the benefits of a server. In addition to Xcode Server, OS X Server can provide services to Mac, Windows, and UNIX computers, and to iOS devices such as iPhone, iPad, and iPod touch. You use the Server app to turn on the services you want to provide, customize service settings, and turn off services you don’t need. Services include Calendar, Contacts, DHCP, DNS, File Sharing, FTP, Mail, Messages, NetInstall, Open Directory, Profile Manager, Software Update, Time Machine, VPN, Websites, Wiki, and Xsan.
For information about setting up and administering these services while running OS X Server, choose Help > Server Help. An administration guide, OS X Server: Advanced Administration, is also available online.