Wikimedia Apps/Team/iOS/CI/ServerSetup

Access Server
You will need to access your server, of course. For Wikimedia you can get that information on the Server Access page..

For anyone else, you can just access it directly, use SSH, or the Apple Screen Sharing.app

Configure Server
Once connected to the server, you need to install various tools to enable continuous integration. Most of the following steps can be performed either through screen sharing or ssh.

Xcode

 * Install Xcode from App Store (must be done via screen sharing)
 * Install the Xcode Command Line Tools by doing one of the following:
 * Launch Xcode app, go to the "Downloads" preference pane, and download the command line tools
 * Run

Upgrading Xcode
Xcode and Command Line Tools can be installed and upgrade through the App Store when using publicly-available versions. If you need a pre-release version of either, download them directly from the SDK section of Apple's developer website. When you upgrade Xcode or Command Line Tools, the machine will be required to restart. After restart occurs, you need to manually sign back in to the OS (via GUI) restore the Jenkins user session. Once signed in, you'll then need to launch Xcode and accept any new Terms and Conditions in order for builds to run without sudo permissions.

OS X Server

 * Install OS X Server via the developer portal or via the app store
 * Enable Remote Access
 * Open the Server App and click on the “Settings” tab
 * Make sure SSH, screen sharing, and remote management are checked


 * Enable access to the server over port “8080”
 * Open the Server App and click on the “Access” tab
 * Click the “+” button at the bottom of the screen and select the “Custom…” option
 * Set the “Name” to Jenkins, the “Port” to 8080, and leave the connections on “All Networks”

Note: AFTER installing OS X Server on the build server, you can also install the OS X Server app on your local machine and connect to it remotely over VPN or while on site.

Install Command Line Tools
The following are used to by the build tools, or used to install build tools. We had problems installing the nokogiri gem on OS X 10.10 Yosemite (required by fastlane), See these Stack Overflow posts for more info:
 * Install Homebrew
 * Install Fastlane
 * Install Cocoapods  (if you use Cocoapods for dependency mangement in your Xcode projects)
 * Install the any other executables needed to perform your build that aren't provided by the OS

http://stackoverflow.com/questions/24091869/installing-nokogiri-on-osx-10-10-yosemite

http://stackoverflow.com/questions/26631482/gem-install-nokogiri-v-1-6-3-1-on-os-x-10-10-yosemite-not-installing

What's currently working on Jenkins is to install libxml et. al using Homebrew, then specify the following options:

Install Jenkins

 * Install Jenkins via homebrew:
 * Edit the configuration ( Note: If these values don’t exist in the file, add them in the Program Arguments array ` ProgramArguments ` )
 * Open the configuration plist in a text editor
 * Modify the http listening address to listen on all ports
 * Modify the port (`8080` is recommended)


 * Setup as a launch process by running
 * Launch Jenkins by running
 * Test by opening http://localhost:8080/ in your browser.
 * HAX: (BG) I had to use EnvInject to set some environment variables, even though they're set in the user's shell. There's currently a stale Jenkins bug on this topic, but current hard-coded values are as follows:
 * HAX: (BG) If a build is hanging for unclear reasons, VNC/Screenshare to the machine and ensure that the hanging process isn't visually prompting the user for access to the keychain. This might be mitigated by unlocking the keychain manually before jobs start executing.
 * HAX: (BG) If a build is hanging for unclear reasons, VNC/Screenshare to the machine and ensure that the hanging process isn't visually prompting the user for access to the keychain. This might be mitigated by unlocking the keychain manually before jobs start executing.
 * HAX: (BG) If a build is hanging for unclear reasons, VNC/Screenshare to the machine and ensure that the hanging process isn't visually prompting the user for access to the keychain. This might be mitigated by unlocking the keychain manually before jobs start executing.
 * HAX: (BG) If a build is hanging for unclear reasons, VNC/Screenshare to the machine and ensure that the hanging process isn't visually prompting the user for access to the keychain. This might be mitigated by unlocking the keychain manually before jobs start executing.
 * HAX: (BG) If a build is hanging for unclear reasons, VNC/Screenshare to the machine and ensure that the hanging process isn't visually prompting the user for access to the keychain. This might be mitigated by unlocking the keychain manually before jobs start executing.
 * HAX: (BG) If a build is hanging for unclear reasons, VNC/Screenshare to the machine and ensure that the hanging process isn't visually prompting the user for access to the keychain. This might be mitigated by unlocking the keychain manually before jobs start executing.

Setup a Project
After you complete the above steps you are ready to configure your project for continuous integration.