Continuous Integration for iOS – OS X user account

| 0 comments

Continuous integration for iOS is an important part of a professional software development workflow and a helper to automate the build and test process.
Besides automatic builds and tests, Jenkins gives the opportunity to run code metrics, to distribute build artefacts to servers or to run every other task which is required for the job.
Once setup, a developer can focus on writing code and tests. Jenkins does the rest of the job. And this always the same way and while the developer is coding.
At the end you get stable build results and an overview about the quality of your code and where it can be improved.
Jenkins Dashboard

There are many blog posts out there, some good, some bad and some wrong. This series here is my summary of infos that I found in various blog posts and tried out in many exploration times. The next four posts contain what I have done to setup a Jenkins on OS X Yosemite which is able to build, test and analyse my projects.

The setup process can be clustered in the following parts:

  1. Create and/or configure the user account on OS X.
  2. Install and configure the Jenkins server.
  3. Create and configure one or more build jobs.
  4. Configure one or more build jobs to run code metrics.

*Ok, then let’s rock! :)*


1. Create and configure the OS X user account

Some of the following steps belong to my personal preferences and are not necessarily required, however very helpful. They are marked with a little (*).

  1. Create a new user account with admin rights for OS X.
  2. (*) Basically configure the system (faster mouse and keyboard, always visible scrollbars, nice background) and install the tools that make you faster (i.e. a visual git client).
    Configure Keyboard in OS XConfigure Mouse in OS X
  3. (*) Install zsh.
    $ curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
  4. (*) Install iTerm2.
  5. (*) Configure zsh and iTerm2 to your needs to speed up usage. (the command line will be used very often)
  6. Install Homebrew and follow the instructions.
    $ ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
  7. Install wget via Homebrew.
    $ brew install wget
  8. (*) Install Ruby via RVM or rbenv to get a controlled Ruby environment. The following example generates a `.ruby-version` file in the project repository (should be committed) which sets the local Ruby version for the project to 1.9.3-p327.:
    $ rbenv local 1.9.3-p327
  9. Install Xcode and command line tools. [How to]
  10. Grant Jenkins access to the required source code. Typically this means to generate one or more SSH keys and register them at a hosting service (e.g. Github, Bitbucket, …) For how to generate a SSH key see the awesome Github help page.

 

📌  The next post will be about the installation and configuration of the Jenkins server itself…

Leave a Reply

Required fields are marked *.