Skip to content

Installation on OSX

SamimBaral edited this page May 6, 2017 · 41 revisions

Jenkins Mac OSX package can be downloaded from https://jenkins.io/. Once the installation is complete the browser opens http://localhost:8080, home of Jenkins.

One of the key steps to follow after Jenkins is successfully installed is to set up Jenkins User and promote it to admin and also adding it to developer group. Follow the following steps:

To add Jenkins user to admin:

sudo dseditgroup -o edit -a jenkins -t user admin

To add Jenkins user to developer group:

sudo dscl . append /Groups/_developer GroupMembership jenkins

To make Jenkins user login automatically when computer restarts:

On System Preferences -> User & Groups , click on the lock sign found on the bottom left of the page. Enter your credentials for the current user account that is being used.

Then select the Jenkins user from the list of users on the left side of the page. If you see an empty user, right click it and select Advanced Options. You can set Full Name of user as Jenkins.

Select Reset Password to set a password of your preference for Jenkins.

Then click Login Option and in Automatic Login set Jenkins like shown in the picture below. This option does not seem to be possible while FileVault is on. On System Preferences -> Security & Privacy, select FileVault and Turn off FileVault. It may quite some time for this process to complete. When the process completes, try again to complete this step. Enter the password for Jenkins user and restart the computer. Upon startup, it will automatically log in as OSX Jenkins user.

Once you have logged in as Jenkins, there are many possibilities to customize the account. An example is to have Jenkins Dashboard open when the computer is restarted. To set this, open Safari and goto Safari->Preferences->General. In Safari opens with, select A new window and set Homepage to http://localhost:8080/.

Then browser has to be open at startup. To set this goto System Preferences->User & Groups->Jenkins->Login Items then click on add sign at the bottom and add Safari.app from Applications

GUI Applications and Jenkins

Jenkins isn't tied to a specific user as it runs as Daemon and for this reason it is unable to run GUI applications. So we need to change Jenkins to run as Launch Agent which runs in the background on behalf of a user. Following steps are necessary for this process:

Unload Jenkins as Daemon

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist 

move .plist file to LaunchAgents folder

sudo mv /Library/LaunchDaemons/org.jenkins-ci.plist /Library/LaunchAgents/

Remove SessionCreate key-value pair to resolve Jenkins issue with iOS simulator

sudo vim /Library/LaunchAgents/org.jenkins-ci.plist

Remove the line

<key>SessionCreate</key
<true />

Different version of Xcode has different issues and should be checked accordingly. Xcode 8 is the version that we have used.

Then Save the file

Press esc and type :wq

Reload Launch Agent to restart Jenkins

sudo launchctl load /Library/LaunchAgents/org.jenkins-ci.plist

Follow this link more tutorials and debugging steps in case of errors http://www.cimgf.com/2015/05/26/setting-up-jenkins-ci-on-a-mac-2/

The Pipeline

Radiators

Clone this wiki locally