forked from b1-systems/buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qemu-kvm-master.cfg
333 lines (261 loc) · 8.61 KB
/
qemu-kvm-master.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# -*- python -*-
# ex: set syntax=python:
###
# buildermaster config file from buildbot.b1-systems.de
# author: Daniel Gollub <gollub@b1-systems.de>
# author: Christian Berendt <berendt@b1-systems.de>
##
###
# Changelog:
# - 20100514, Christian Berendt <berendt@b1-systems.de>
# * removed buildbot avi-kvmbot1 with all dependencies
# * removed unused bot-arrays
# * removed commented unused builders
####
# Namenschemata:
#builders.append({
# 'name': 'FACTORYNAME-ARCHITEKTUR{-DISTRIBUTION}{-VERSION}',
# 'slavenames': bots-ARCHITEKTUR{-DISTRIBUTION}{-VERSION},
# 'builddir': 'FACOTRYNAME-ARCHITEKTUR{-DISTRIBUTION}{-VERSION}',
# 'factory': f_FACTORYNAME
#})
# Slave Admins:
# b1 -> Christian Berendt, Daniel Gollub
# ...
# Botnamen:
# ADMIN-PROJECT-1
# ADMIN-PROJECT-2
# ...
####
import sys
sys.path.append('/var/lib/buildbot/qemu-kvm')
from database_authority import *
c = BuildmasterConfig = {}
####### PROJECT IDENTITY
c['projectName'] = "qemu-kvm"
c['projectURL'] = "http://www.linux-kvm.org/"
c['buildbotURL'] = "http://buildbot.b1-systems.de/qemu-kvm/"
from buildbot.steps.source import Git
repository = Git(repourl="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm")
emailAddressFrom = "qemu-kvm@buildbot.b1-systems.de"
#emailAddressesNotify = ["berendt@b1-systems.de", "gollub@b1-systems.de"]
emailAddressesNotify = ["kvm@vger.kernel.org", "gollub@b1-systems.de"] # gollubis only in there for testing purposes
#emailAddressesNotify = ["gollub@b1-systems.de"] # gollub is only in there for testing purposes
#emailAddressesNotify = ["berendt@b1-systems.de"] # berendt is only in there for testing purposes
####### STATUS TARGETS
c['status'] = []
from buildbot.status import html
c['status'].append(html.WebStatus("tcp:3000:interface=127.0.0.1"))
#c['status'].append(html.Waterfall("tcp:3001:interface=127.0.0.1"))
from buildbot.status import mail
c['status'].append(
mail.MailNotifier(
fromaddr=emailAddressFrom,
mode='problem', # only send mail about a build which failed when the previous build passed
extraRecipients=emailAddressesNotify,
sendToInterestedUsers=False
)
)
#####################################################################
# BUILDSLAVES
c['slaves'] = database_authority
bots_i386_debian_5_0 = ["b1_qemu_kvm_2"]
bots_i386_debian = bots_i386_debian_5_0
bots_i386 = bots_i386_debian
bots_x86_64_debian_5_0 = ["b1_qemu_kvm_1"]
bots_x86_64_debian = bots_x86_64_debian_5_0
bots_x86_64 = bots_x86_64_debian
bots_all = bots_i386 + bots_x86_64
# max_builds = 2 # limits to two concurrent builds
c['slavePortnum'] = 9989
#####################################################################
# CHANGESOURCES
from buildbot.changes.pb import PBChangeSource
c['change_source'] = PBChangeSource()
#####################################################################
# SCHEDULERS
from buildbot.scheduler import Scheduler, Periodic, Nightly, AnyBranchScheduler
default_builders = [
"default_x86_64_debian_5_0",
"default_i386_debian_5_0",
## Out of Tree Builders ##
"default_x86_64_out_of_tree",
"default_i386_out_of_tree",
]
disable_kvm_builders = [
"disable_kvm_x86_64_debian_5_0",
"disable_kvm_i386_debian_5_0",
## Out of Tree Builders ##
"disable_kvm_x86_64_out_of_tree",
"disable_kvm_i386_out_of_tree",
]
testBuilders = [
"default_x86_64_debian_5_0",
"default_i386_debian_5_0",
"disable_kvm_x86_64_debian_5_0",
"disable_kvm_i386_debian_5_0",
## Out of Tree Builders ##
"default_x86_64_out_of_tree",
"default_i386_out_of_tree",
"disable_kvm_x86_64_out_of_tree",
"disable_kvm_i386_out_of_tree",
]
c['schedulers'] = []
c['schedulers'].append(
Nightly(
name="nightly_default",
branch="master",
builderNames=default_builders,
hour=3, minute=3
)
)
c['schedulers'].append(
Nightly(
name="nightly_disable_kvm",
branch="master",
builderNames=disable_kvm_builders,
hour=4, minute=3
)
)
c['schedulers'].append(
AnyBranchScheduler(
name="default",
branches=["master", "next", "stable-0.10", "stable-0.11"],
treeStableTimer=7200,
builderNames=default_builders
)
)
c['schedulers'].append(
AnyBranchScheduler(
name="disable-kvm",
branches=["master", "next", "stable-0.10", "stbale-0.11"],
treeStableTimer=7200,
builderNames=disable_kvm_builders
)
)
#c['schedulers'].append(
# Scheduler(
# name="all",
# branch="master",
# treeStableTimer=1200,
# builderNames=allDefaultBuilders
# )
#)
### try: Scheduler
from buildbot.scheduler import Try_Userpass
try_sched = Try_Userpass(
"try_command",
testBuilders,
port=8031,
userpass=database_authority_try
)
c['schedulers'].append(try_sched)
#####################################################################
# FACTORIES
from buildbot.process import factory
from buildbot.steps import shell
from buildbot.steps.shell import Configure, Compile, ShellCommand
## ffactory.GNUAuoconf cannot overwrite env for build targets or so ...
## just configure Env ... useless.
#f_default = factory.GNUAutoconf(
# source=repository,
# configureEnv={'LANG': 'C'},
# test=None
#)
#
#f_disable_kvm = factory.GNUAutoconf(
# source=repository,
# configureFlags=["--disable-kvm"],
# configureEnv={'LANG': 'C'},
# test=None
#)
f_default = factory.BuildFactory()
f_default.addStep(Git(repourl="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm"))
f_default.addStep(Configure(command="./configure", env={'LANG': 'C'}))
f_default.addStep(Compile(command="make", env={'LANG': 'C'}))
f_disable_kvm = factory.BuildFactory()
f_disable_kvm.addStep(Git(repourl="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm"))
f_disable_kvm.addStep(Configure(command="./configure --disable-kvm", env={'LANG': 'C'}))
f_disable_kvm.addStep(Compile(command="make", env={'LANG': 'C'}))
###
# f_out_of_tree_default: mkdir outoftree; cd outoftree; ../configure
f_out_of_tree_default = factory.BuildFactory()
f_out_of_tree_default.addStep(Git(repourl="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm"))
f_out_of_tree_default.addStep(ShellCommand(command="mkdir -p outoftree", env={'LANG': 'C'}))
f_out_of_tree_default.addStep(Configure(command="cd outoftree; ../configure", env={'LANG': 'C'}))
f_out_of_tree_default.addStep(Compile(command="cd outoftree; make", env={'LANG': 'C'}))
# f_out_of_tree_disable_kvm: mkdir outoftree; cd outoftree; ../configure --disable-kvm
f_out_of_tree_disable_kvm = factory.BuildFactory()
f_out_of_tree_disable_kvm.addStep(Git(repourl="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm"))
f_out_of_tree_disable_kvm.addStep(ShellCommand(command="mkdir -p outoftree", env={'LANG': 'C'}))
f_out_of_tree_disable_kvm.addStep(Configure(command="cd outoftree; ../configure --disable-kvm", env={'LANG': 'C'}))
f_out_of_tree_disable_kvm.addStep(Compile(command="cd outoftree; make", env={'LANG': 'C'}))
#####################################################################
# BUILDERS
## Lock to avoid multiple builds of qemu-kvm on slow/tiny
## buildslaves
from buildbot.locks import SlaveLock
slow_lock = SlaveLock("cpu")
builders = []
builders.append({
'name': 'default_x86_64_debian_5_0',
'slavenames': bots_x86_64_debian_5_0,
'builddir': 'default_x86_64_debian_5_0',
'locks': [slow_lock],
'factory': f_default
})
builders.append({
'name': 'default_i386_debian_5_0',
'slavenames': bots_i386_debian_5_0,
'builddir': 'default_i386_debian_5_0',
'locks': [slow_lock],
'factory': f_default
})
## disable-kvm Builders
builders.append({
'name': 'disable_kvm_x86_64_debian_5_0',
'slavenames': bots_x86_64_debian_5_0,
'builddir': 'disable_kvm_x86_64_debian_5_0',
'locks': [slow_lock],
'factory': f_disable_kvm
})
builders.append({
'name': 'disable_kvm_i386_debian_5_0',
'slavenames': bots_i386_debian_5_0,
'builddir': 'disable_kvm_i386_debian_5_0',
'locks': [slow_lock],
'factory': f_disable_kvm
})
## out of tree builders
### this should be arch and distro indepedent issues
### just use all slaves for that
#### But maybe arch dependent?!
builders.append({
'name': 'default_x86_64_out_of_tree',
'slavenames': bots_x86_64,
'builddir': 'default_x86_64_out_of_tree',
'locks': [slow_lock],
'factory': f_out_of_tree_default
})
builders.append({
'name': 'default_i386_out_of_tree',
'slavenames': bots_i386,
'builddir': 'default_i386_out_of_tree',
'locks': [slow_lock],
'factory': f_out_of_tree_default
})
builders.append({
'name': 'disable_kvm_x86_64_out_of_tree',
'slavenames': bots_x86_64,
'builddir': 'disable_kvm_x86_64_out_of_tree',
'locks': [slow_lock],
'factory': f_out_of_tree_disable_kvm
})
builders.append({
'name': 'disable_kvm_i386_out_of_tree',
'slavenames': bots_i386,
'builddir': 'disable_kvm_i386_out_of_tree',
'locks': [slow_lock],
'factory': f_out_of_tree_disable_kvm
})
c['builders'] = builders