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
|
categories = [
'repo_update',
'definitions_update',
'build_complete',
'deploy_complete']
buildslave_scripts = 'git://cu010-trove.codethink.com/cu010-trove/br6/buildslave-scripts.git'
class Column:
def __init__(self,
name,
category,
trigger,
properties,
get_definitions=False):
self.name = name
self.category = category
self.trigger = 'triggers/%s' % trigger
self.properties = properties
self.get_definitions=get_definitions
from buildbot.process.factory import BuildFactory
from buildbot.steps.shell import ShellCommand
from buildbot.plugins import steps, util
self.util_properties = []
for property in self.properties:
self.util_properties.append(
util.Property(property[0],default=property[1]))
self.factory = BuildFactory()
self.factory.addStep(steps.Git(
repourl=buildslave_scripts,
mode='incremental'))
self.cmd = ['sh',self.trigger]+self.util_properties
if self.get_definitions:
get_defns_cmd = ['sh','get_definitions.sh']
self.factory.addStep(ShellCommand(command=get_defns_cmd))
self.factory.addStep(ShellCommand(command=self.cmd))
columns = [
Column( name = "1. Integration",
category = "repo_update",
trigger = 'firehose_trigger.sh',
properties = [('repo_name','no repo name given')]),
Column( name = "2. Build",
category = "definitions_update",
trigger = 'builders_trigger.sh',
properties = [("force","")],
get_definitions = True),
Column( name = "3. Deploy",
category = "build_complete",
trigger = 'deploy_trigger.sh',
properties = [
('system','no system give'),
('buildnumber',0),
('buildslave_scripts_sha','no buildslave-scripts SHA given'),
('definitions_sha','no definitions SHA given'),
('testing_sha','no testing SHA given')],
get_definitions = True),
Column( name = "4. Test",
category = "deploy_complete",
trigger = 'testing_trigger.sh',
properties = {[
('artefact','no artefact given'),
('testing_sha','no testing SHA given')])]
build_timeout = 1800
deploy_timeout = 1800
web_user = "codething"
web_user_password = "password"
|