Skip to content

Continuous Integration for iPhone/Xcode projects

I just committed an initial pass at an Xcode builder for CruiseControl. If you want to try it out you’ll need to get the latest code from svn. Right now the plugin is extremely rudimentary: it has only the single attribute ‘directory’ which is where it will invoke xcodebuild.

Here’s an example from config.xml for capturing the images below:

    <project name="RaiseMan">

        <listeners>
            <currentbuildstatuslistener file="logs/${project.name}/status.txt"/>
        </listeners>

        <modificationset quietperiod="30">
            <svn localworkingcopy="${BookProjects}/${project.name}"/>
        </modificationset>

        <schedule interval="60">
            <xcode directory="${BookProjects}/${project.name}"/>
        </schedule>

        <publishers>
            <artifactspublisher dest="artifacts/${project.name}"
                      file="${BookProjects}/${project.name}/xcodebuild.cc.output"/>
        </publishers>

    </project>

Even though the plugin is very simple has all the basics. Like the Ant builder can monitor the build output while it’s happening from the dashboard, and you can see errors and warnings in the jsp reporting app and in email. But unlike the Ant builder you can also publish the build log as an artifact so that you an view it later as plain text.

see build progress in the dashboard

see build progress in the dashboard

view build errors

view build errors

publish log as artifact

publish log as artifact

view complete build log

view complete build log

Hope you like it!

10 Comments

  1. Jtf wrote:

    The xcode builder is part of the CruiseControl 2.8.1 release. Since this blog post I’ve added a timeout attribute and a way to specify command-line args. Documentation here.

    Monday, December 1, 2008 at 12:59 pm | Permalink
  2. applmak wrote:

    Hi. I like the new builder. Very handy.

    However, I’ve noticed a couple of issues, and the CC website doesn’t make it clear how to report them. But I’ve found my way here, hoping to get your attention. Just email me at the provided address when you get this, and I’ll tell you what I’m seeing.

    -M

    Saturday, December 13, 2008 at 6:21 pm | Permalink
  3. Jtf wrote:

    I’m a committer on CruiseControl so you can always report issues on either the CruiseControl users mailing list or on the issue tracker.

    And if by chance the issue is a problem using nested args, I committed a fix for that tonight that you can get by pulling the latest source.

    Saturday, December 13, 2008 at 8:39 pm | Permalink
  4. Jason wrote:

    When will an official CC release be made that includes the “args” support in the Xcode builder? I gather if I want to get this early I need to start with the current SVN repository. I’m not too keen on that for a production environment.

    I’m trying out the execbuilder in the meantime.

    Wednesday, December 31, 2008 at 4:22 pm | Permalink
  5. Jtf wrote:

    I’m hoping to have the next CC release out by this weekend. Would have been out already if I hadn’t been delayed by hardware problems.

    But on the good side, Time Capsule works! ;)

    Tuesday, January 6, 2009 at 11:01 pm | Permalink
  6. Jtf wrote:

    The new release is out and you can download it now.

    Monday, January 12, 2009 at 11:57 pm | Permalink
  7. IntarTech wrote:

    Just set up CC for the first time, so I could try your Xcode support.

    I have added 3 of my projects to the config.xml, but am finding that the ‘xcodebuild.cc.output’ file is not getting written into the folder specified by the ‘directory’ setting for each project.

    In fact, each project appears to have the cc.output file written out to the folder of the FIRST project that CC built when launching it. This results in a failure at the end of builds, where the cc.output file can’t be found (it attempts to find it in the project folder but it’s actually in another project’s folder).

    Has anyone else reported this to you? I will find and sign up for the appropriate mailing list and post there, but I just thought I’d leave feedback here in case that’s helpful.

    Kind Regards.

    Saturday, March 14, 2009 at 9:34 am | Permalink
  8. Jtf wrote:

    Thanks for pointing out the bug. As I mentioned on the CC mailing list I’ve fixed it and you can get the source now and build it locally or just wait until 2.8.3 is released.

    Saturday, March 14, 2009 at 10:11 pm | Permalink
  9. Jason Boehle wrote:

    Does the Xcode builder pass on the standard CC builder properties to Xcode as env vars? If not, it should. In particular, I want ${svnrevision}, so my pre-build script in my Xcode project can use it to update the version #.

    Thursday, April 30, 2009 at 2:16 pm | Permalink
  10. Jtf wrote:

    No, the Xcode builder isn’t passing any environment variables, though I agree it would be a good idea. Patches gratefully accepted. :)

    I don’t know if it helps in your case but it will do property substitution with the command-line, so if there was some way to pass a value through xcodebuild on the command-line that would work.

    Thursday, April 30, 2009 at 3:59 pm | Permalink

2 Trackbacks/Pingbacks

  1. iPhone Unit Testing Toolkit at Carbon Five Community on Friday, February 13, 2009 at 2:36 pm

    [...] is now a recently released Xcode builder for CruiseControl. However, we use Bamboo for CI for our Java and Ruby projects and are considering moving to [...]

  2. Agile Development Notes on iPhone Development @ GQAdonis on Sunday, November 29, 2009 at 5:52 pm

    [...] not found a lot on how to do continuous integration in iPhone development, but I did come across one interesting article by Jeffrey Fredrick that explained how to use Cruise Control on Xcode [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*