Saturday, August 10, 2013

Setup continuous integration (CI) with Jenkins / Hudson for TestFlight

Steps taken between Nov 12, 2012 and Mar 7, 2013 to finally get it going:
  1. Started with a tutorial.
  2. Then went here to download Jenkins for mac.
  3. I tried 5 builds so far via Jenkins, all resulted in failure, solved a few configuration issues to resolve problems, and now I'm facing an issue that has to do with keychains. Tried to follow this thread to figure out the appropriate action.
  4. Decided to uninstall Jenkins using these instructions
  5. Instead used a new installer that circumvents the keychain access issues.
  6. I let it checkout my project into its workspace once at:
    /Users/pulkitsinghal/.jenkins/jobs/my_project/workspace
    But afterwards I deleted that workspace and soft-linked it with the actual directory which I already have setup for development:
    cd /Users/pulkitsinghal/.jenkins/jobs/my_project
    ln -s ~/dev/my_project/ ./workspace
    And I completely turned off the git checkout process in the Jenkin's job configuration just to be safe ... although I should have been able to get away by simply ignoring submodules too but why checkout when I don't need to.
  7. Then I bumped my head on this:
    fatal error: 'RestKit/RestKit.h' file not found
    #import
    ^
    1 error generated.
  8. It should have already been working based on the directions from the RestKit website: Add the following Header Search Paths (including the quotes):
    "$(BUILT_PRODUCTS_DIR)/../../Headers"
    But I suppose for some reason that meant one thing to Xcode and something entirely different to jenkins-xcode-plugin. So through trial and error and watching the logs, I figured out that I needed to add:
    "$(BUILT_PRODUCTS_DIR)/../my_project/Build/Headers
    in order for jenkins-xcode-plugin to pick it up and work with it properly.
  9. Ran into another road-block ... posted question to stackoverflow.
  10. Then got stuck due to this issue.