Update: Use Jenkins Slave for OS X instead. It’s based on these gists and has the benefit of being maintained.
I have been using Jenkins for continuous integration (CI) with some Java-based projects, and recently setup Jenkins for CI for a OS X application. For the Java-based projects, running Jenkins on a Linode works well, but the Linode-based Jenkins instance cannot build iOS or OS X applications.
Its easy to setup Jenkins to support distributed builds with a OS X system as a slave, provided the master can initiate SSH communications to the slave. If, like me, your Jenkins master cannot initiate a connection with your slave (which is my desktop iMac), it is still trivial to configure the slave to use Java Web Start (JNLP).
The following script launches the Jenkins slave service via Java Web Start after downloading the slave.jar file (thereby ensuring that the slave.jar is always the current version):
Launchd (the OS X launch manager) can launch this file using the following property list:
I have a simple script that can install these files for use by the user jenkins:
It can be run by copying the following command into a Terminal window: