Team Axe, LLC. HomeHome Team Axe, LLC. FacebookFacebook Team Axe, LLC. TwitterTwitter

Sunday, May 27, 2012

Magnum CI

Whoo, boy, is Jenkins awesome. The amount of great free software out there right now is just staggering. This is such a great time to be an engineer. Anyway, there's planty of write-ups about Jenkins out there. I'm putting my little story up more for self-documentation than anything. Hopefully, someone will find this helpful.



From scratch, there are a lot of steps involved with setting up your own iOS build box. But, it can be done completely free. This is provided that you have a recent Mac sitting around with nothing better to do, and honestly, who doesn't!? So, anyway, the first thing you need to do is get Xcode on that thing. To the App Store!

Once you've got Xcode downloaded, you need to go get all of the SDK's that you're going to support, too. You'll find those under Preferences -> Downloads -> Components.

Next, you'll have to get your project over there, and build it. If you're going to be doing any IPA/OTA packaging stuff, you'll also need your developer profile on this box along with your private key and cert as well as the Apple Certs from the Developer Portal. After you've gotten all this setup and can successfully build, run and test your project, you're ready for the CI'ing.

Go get Jenkins. It's so good. My favorite way of deploying Jenkins right now is StiSti's nice little packaged Applescript launcher. Now, you're probably saying, "Yes, but I want to do some nifty Tomcat action and just add the war to my app server. I also want it to run on boot and as my daemon user." Those are all good things to do. But, there are a couple of things that got me looking into the simple script startup:

  • Doxygen Issue - There's currently an issue with generating Doxygen when installed on Tomcat
  • Keychain - If you're doing any provisioning, getting it to work as a user that is not you is fun. Particularly, if you're trying to do it as a user that doesn't have a Keychain.
  • Overkill - Jenkins has its own little server built into the war. If you're trying to build up a Tomcat server from scratch just to host Jenkins, that's a chainsaw-where-you-needed-a-scalpel issue.

With those things in mind, I decided to avoid the Tomcat route, and use the nice little OS X Launcher. Once Jenkins is up and running, there are oodles of plugins that you'll want to checkout. This is a list of plugins that I have installed. While most of these are not strictly necessary (as you can replicate their functionality by raw scripting), I don't see any reason to avoid these very well supported plugins.
  • Xcode Plugin - It simplifies having to setup shell scripts with xcodebuild, codesign, etc.
  • git Plugin - You are using git, right?
  • Cobertura - This plugin allows you to view your Code Coverage.
  • Throttle - You shouldn't be running multiple System Tests simultaneously. This plugin allows you to tell Jenkins to only run certain jobs in certain batches and orders.
  • Thin Backup - After doing all of this config work, you'll want to have a backup of it.
  • HTML Publisher - This plugin allows you to publish standard HTML reports from automatically generated things like gcovr.
  • Jenkins Dashboard - This will allow you to have the nice charts on the home page.
  • xUnit Plugin - This will allow you to turn standard xml logs into jUnit type output that is easily html formatted.
  • Doxygen - In all honesty, I haven't gotten this one to run, yet. I'll write up a post when I get it going.

No comments:

Post a Comment

©Team Axe, LLC