Jenkins is the most prominent solution for on-site continuous integration. It can run on most platforms, including OSX. Since it can run on a mac, you can use it to setup a continuous integration strategy for iOS apps. Chances are you will not want your core Jenkins instance running on a Mac, luckily Jenkins lets you set up slaves to run tasks.
First you need to add the slave to Jenkins.
Manage Jenkins -> Manage Nodes -> New Node
Give it a name and select dumb slave
Click Ok
Enter /Users/jenkins/build/ for remote root directory Click Save
Create a user named jenkins
Go into Jenkins -> Manage Jenkins -> Manage Nodes Click on the node you just created
Click Launch to connect to Jenkins as a slave
You might have to install Java, there will be a pop up if you do.
Thats it, no you can use OSX for Jenkins builds.
Our goal is to have OSX connect as a Jenkins when it starts and to stay connected.
You will need this to connect to Jenkins from the command line.
I used the version found here but you might want to google and see what the latest is.
This is the most complicated step in the process. Create a new file called com.jenkins.ci.plist and add the following.
Replace http://192.168.1.151:8080 with the address of your Jenkins machine. Note that this example does not use authentication for Jenkins. If your setup uses authentication (it most likely does) you will need to add additional argument to the plist.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.jenkins.ci</string> <key>UserName</key> <string>jenkins</string> <key>SessionCreate</key> <true/> <key>ProgramArguments</key> <array> <string>java</string> <string>-Djava.awt.headless=true</string> <string>-jar</string> <string>/Users/jenkins/Desktop/slave.jar</string> <string>-jnlpUrl</string> <string>http://192.168.1.151:8080/computer/mac_vm/slave-agent.jnlp</string> </array> <key>KeepAlive</key> <true/> <key>StandardOutPath</key> <string>/Users/jenkins/Desktop/stdout.log</string> <key>StandardErrorPath</key> <string>/Users/jenkins/Desktop/error.log</string> </dict> </plist>
Move this file to /Library/LaunchDaemons You will be prompted for authentication
Now you need to change the file permissions so that it will be handled correctly by root.
sudo chown root com.jenkins.ci.plist sudo chmod 644 com.jenkins.ci.plist
Thats it. Now your OSX machine will connect to Jenkins as a slave whenever it is on.