Github Xcode Bot Builder

A command line tool that creates/manages/deletes Xcode 5 server bots for each Github pull request. When a pull request is opened a corresponding Xcode bot is created. When a new commit is pushed the bot is re-run. When the build finishes the github pull request status is updated with a comment if there’s an error. Users can request that a pull request be retested by adding a comment that includes the word “retest” (case insensitive). When a pull request is closed the corresponding bot is deleted.

Setup

Make sure your Xcode server is correctly setup to allow ANYONE to create a build (without a username or password, see suggested features below). Then make sure you can manually create and execute a build and run it.

Create a ~/.bot-sync-github.cfg

Go to your Github Account Settings and create a personal access token which you will use as your github_access_token so that the bot-sync-github script can access your github repo

github_access_token = 57244a72a7ca33931a40eb4ec21621505ab9f6b3
github_url = https://github.com/someuser/Some-Repo.git
github_repo = someuser/Some-Repo
xcode_server = 192.168.10.123
xcode_devices = iphonesimulator iPhone Retina (4-inch) 7.0|iphonesimulator iPhone Retina (4-inch) 6.1
xcode_scheme = Some-Scheme-Name-app
xcode_project_or_workspace = SomeProject.xcworkspace # or SomeProject.xcproject

Note that xcode_devices need to be pipe delimited. To get the list of available devices run the bot-devices command. The xcode_server can either be an ip address or a hostname.

Manually run bot-sync-github from the command line to make sure it works

Schedule bot-sync-github to run in cron every couple of minutes. For example if you’re using RVM:

*/2 * * * * $HOME/.rvm/bin/ruby-2.0.0-p247 $HOME/.rvm/gems/ruby-2.0.0-p247/bin/bot-sync-github >> /tmp/bot-sync-github.log 2>&1

Troubleshooting

Send us a pull request with your troubleshooting tips here!

Contributing

Suggested features to contribute

Contributors

Copyright

Copyright © 2013 ModCloth. See LICENSE for further details.