1 | How to setup a buildslave? |
---|
2 | -------------------------- |
---|
3 | |
---|
4 | 1. Install Buildbot |
---|
5 | ------------------- |
---|
6 | Buildbot is a Python application, you need to install Python 2.2+. |
---|
7 | |
---|
8 | Download & install: |
---|
9 | - Twisted 2.2: http://twistedmatrix.com/trac/ |
---|
10 | - ZopeInterface 3.0.1: http://www.zope.org/Products/ZopeInterface |
---|
11 | - Buildbot 0.7.2: http://sourceforge.net/project/showfiles.php?group_id=73177 |
---|
12 | |
---|
13 | The Buildbot installer creates a buildbot script in /usr/bin. On Windows, |
---|
14 | buildbot.bat is installed in the %PYTHON\Scripts folder. |
---|
15 | |
---|
16 | Test your buildbot install by running the buildbot script. |
---|
17 | |
---|
18 | 2. Creating a buildslave |
---|
19 | ------------------------ |
---|
20 | Creating a buildslave is explained in the Buildbot manual: |
---|
21 | http://buildbot.sourceforge.net/manual-0.7.2.html#Creating-a-buildslave |
---|
22 | |
---|
23 | Before you can install the buildslave, you'll need some information from |
---|
24 | the buildmaster administrator: |
---|
25 | |
---|
26 | - your botname and password. The botname is a unique id for your buildslave. |
---|
27 | Current botnames include the OS+version, compiler and processor architecture. |
---|
28 | (eg. osx10.4-gcc4.0.1-ia32, xp-vs2003-ia32...) |
---|
29 | - hostname and port on which the buildmaster is listening. |
---|
30 | - hostname and port on which the TryScheduler is listening. |
---|
31 | - username and password for the FTP server where you can send the test log- |
---|
32 | files. |
---|
33 | |
---|
34 | The buildmaster administrator for http://www.mobsol.be/buildbot/ can be |
---|
35 | reached at lgo@mobsol.be. |
---|
36 | |
---|
37 | Make sure you fill in the info/host file with some information concerning your |
---|
38 | buildslave. |
---|
39 | |
---|
40 | 3. Setting up the buildslave |
---|
41 | ---------------------------- |
---|
42 | A build on a slave is always triggered and managed by the Buildmaster. In fact, |
---|
43 | by connecting to the buildmaster, the slave gives full shell access on his |
---|
44 | machine to the buildmaster! Make sure you run the slave in an account with |
---|
45 | limited access. |
---|
46 | |
---|
47 | The build process is split in 4 steps. |
---|
48 | - svn checkout or update |
---|
49 | - build |
---|
50 | - check |
---|
51 | - clean |
---|
52 | |
---|
53 | The first step is handled by the buildbot code (SVNStep) and can not be |
---|
54 | further configured on the buildslave. |
---|
55 | For all the other steps you have to provide scripts and put them in the |
---|
56 | slavedir/[botname] folder. |
---|
57 | |
---|
58 | You can copy and reuse the scripts the other buildbot slave owners use for |
---|
59 | Windows, Linux or Mac buildslaves. You can find them here: |
---|
60 | http://svn.collab.net/repos/svn/trunk/tools/buildbot/slaves |
---|
61 | |
---|
62 | 4. Builds |
---|
63 | --------- |
---|
64 | A build will be triggered each time someone commits changes on trunk or |
---|
65 | branches/1.4.x. If the buildslave is not online, then the build will be |
---|
66 | stored in the queue and started when the buildslave connects. |
---|
67 | |
---|
68 | Normally each build only includes the changes of one commit. However, when |
---|
69 | multiple changes arive during a previous build, those will be combined in |
---|
70 | a next build. |
---|
71 | |
---|
72 | The buildmaster looks at each commit and decides if they are important enough |
---|
73 | to trigger a build. Documentation, contrib, www... changes are typically |
---|
74 | ignored. |
---|
75 | |
---|
76 | 5. Try |
---|
77 | ------ |
---|
78 | Buildbot has a feature that allows a Subversion developer to test a patch she's |
---|
79 | working on on one of the builders. Example, someone working on Linux might want |
---|
80 | to test a major change first on a Windows builder before committing the patch. |
---|
81 | |
---|
82 | It's up to you to choose whether your buildslave can accept patches or not, |
---|
83 | there's no obligation. Basically by allowing patches to be tried on your |
---|
84 | buildslave you give people the ability to compile and execute arbitrary code |
---|
85 | on your machine. |
---|
86 | Try access is password protected and will be reserved to Subversion full |
---|
87 | committers. |
---|
88 | |
---|
89 | How to use the try feature: |
---|
90 | TryScheduler is installed on its own dedicated port. It can be used by |
---|
91 | a client with 'buildbot try': |
---|
92 | http://buildbot.sourceforge.net/manual-0.7.5.html#try |
---|
93 | |
---|
94 | Contact the buildmaster administrator for the username & password which you |
---|
95 | need to use 'buildbot try'. |
---|