Buildbot Setup for MacOSX

You are viewing an old version of this article. View the current version here.

Setting up a Buildbot slave on Mac OS X

Install buildbot using macports or fink.

Add user buildbot:

mkdir /var/lib
mkdir /var/lib/buildslave
dscl . -create /Users/buildbot
dscl . -create /Users/buildbot RealName "Build bot slave"
dscl . -create /Users/buildbot NFSHomeDirectory /var/lib/buildslave
dscl . -create /Users/buildbot UserShell /bin/bash
dscl . -create /Users/buildbot UniqueID 101
dscl . -create /Users/buildbot PrimaryGroupID 101
chown 101:101 /var/lib/buildslave/

To hide the user use:

defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add buildbot

Prepare environment:

sudo -i -u buildbot
buildbot create-slave --usepty=0 maria-slave hasky.askmonty.org:9989 <slavename> <passwd>
bzr init-repo --1.9 maria-slave/<slavedirectory>
$EDITOR maria-slave/info/admin
$EDITOR maria-slave/info/host
logout

Buildbot can be started/stopped manually with these commands (it's a good idea to start and stop it to see if it is set up correctly):

sudo -i -u buildbot
buildbot start maria-slave
buildbot stop maria-slave
logout

In order to make buildbot start on system boot, you'll need to create /Library/LaunchDaemons/net.sourceforge.buildbot.plist file with the following contents (modified example from buildbot wiki):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
 	<key>StandardOutPath</key>
 	<string>twistd.log</string>
 	<key>StandardErrorPath</key>
 	<string>twistd-err.log</string>
 	<key>EnvironmentVariables</key>
 	<dict>
 		<key>PATH</key>
 		<string>/opt/local/bin:/sbin:/usr/sbin:/bin:/usr/bin</string>
 		<key>PYTHONPATH</key>
 		<string>/opt/local/lib/python2.5/site-packages</string>
 	</dict>
 	<key>GroupName</key>
 	<string>daemon</string>
 	<key>KeepAlive</key>
 	<dict>
 		<key>SuccessfulExit</key>
 		<false/>
 	</dict>
 	<key>Label</key>
 	<string>net.sourceforge.buildbot.slave.test</string>
 	<key>ProgramArguments</key>
 	<array>
 		<string>/opt/local/bin/buildbot</string>
 		<string>start</string>
 		<string>maria-slave</string>
 	</array>
 	<key>RunAtLoad</key>
 	<true/>
 	<key>UserName</key>
 	<string>buildbot</string>
 	<key>WorkingDirectory</key>
 	<string>/var/lib/buildslave/</string>
    </dict>
</plist>

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.