summaryrefslogtreecommitdiff
path: root/buildbot/master-lonelyslave.cfg
blob: 7c81951259d599ca76b1a81dc131ef04df0449a7 (plain)
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
# -*- python -*-
# ex: set syntax=python:

c = BuildmasterConfig = {}
local = "${HOME}/local"

####### LOGS SIZE

c['changeHorizon'] = 20
c['buildHorizon'] = 10
c['logHorizon'] = 4
c['buildCacheSize'] = 2 

####### BUILDSLAVES

from buildbot.worker import Worker
c['workers'] = [Worker("lonelySlave", "taler"),
                Worker("lcovSlave", "taler"),
                Worker("containersSlave", "taler")]

c['protocols'] = {'pb': {'port': 9989}}

####### CHANGESOURCES
# They are just "pointers" to monitored codebases.


from buildbot.changes.gitpoller import GitPoller
c['change_source'] = []
c['change_source'].append(GitPoller(
        'git://git.taler.net/exchange.git',
        workdir='gitpoller-workdir', branches=True,
        pollinterval=300))
c['change_source'].append(GitPoller(
        'git://git.taler.net/merchant.git',
        workdir='gitpoller-workdir', branches=True,
        pollinterval=300))
c['change_source'].append(GitPoller(
        'git://git.taler.net/bank.git',
        workdir='gitpoller-workdir', branches=True,
        pollinterval=300))
c['change_source'].append(GitPoller(
        'git://git.taler.net/merchant-frontends.git',
        workdir='gitpoller-workdir', branches=True,
        pollinterval=300))

####### SCHEDULERS
# They take action: actually trigger the build.

from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.schedulers.forcesched import ForceScheduler
from buildbot.schedulers.timed import *
from buildbot.changes import filter

c['schedulers'] = []
gitMaster = SingleBranchScheduler(
    name="global-master",
    reason="Commit pushed for one of the sub-projects",
    change_filter=filter.ChangeFilter(branch='master'),
    treeStableTimer=300,
    builderNames=["lone-builder", "lcov-build"])

force = ForceScheduler(name="force-build",
                       builderNames=["lone-builder"])

# For now, the whole withdraw/pay cliking is started manually
# (as the blue-green infrastructure needs some upgrading)
forceClick = ForceScheduler(		
    name="force-clicking",
    builderNames=["auto-click"])


c['schedulers'] = [force, gitMaster, forceClick]

####### BUILDERS
# They know *how* to build: which scripts need to be invoked,
# where in the filesystem..

from buildbot.process.factory import BuildFactory
from buildbot.steps.source.git import Git
from buildbot.steps.shell import ShellCommand
from buildbot.steps.shell import Configure
from buildbot.steps.shell import Compile
from buildbot.steps.shell import Test
import os

lonelyness = BuildFactory()
lonelyness.addStep(Git(repourl='git://git.taler.net/deployment.git',
                       mode='full',
                       method='fresh',
                       alwaysUseLatest=True,
                       haltOnFailure=True,
                       branch='master'))
lonelyness.addStep(ShellCommand(name="switcher",
                                description="Lone compilation..",
                                descriptionDone="Compilation passed",
                                command=["make"], 
                                workdir="build/taler-build",
                                env={'PATH': "${HOME}/local/bin:${PATH}",
                                     'TALER_CHECKDB': "postgres:///talercheck-${USER}"}))
lcov = BuildFactory()
lcov.addStep(Git(repourl='git://git.taler.net/deployment.git',
                 mode='full',
                 method='fresh',
                 alwaysUseLatest=True,
                 haltOnFailure=True,
                 branch='master'))
lcov.addStep(ShellCommand(name="invalidation",
                          description="Invalidating timestamps",
                          descriptionDone="timestamps invalidated",
                          command=["./invalidate.sh"], 
                          workdir="build/taler-build"))
lcov.addStep(ShellCommand(name="builder",
                          description="Compiling..",
                          descriptionDone="lcov files generated",
                          command=["make", "lcov"], 
                          workdir="build/taler-build"))

autoClick = BuildFactory()
autoClick.addStep(ShellCommand(name="clicker",
                               description="Performing demo",
                               descriptionDone="Demo finished",
                               command=["launch_selenium_test.sh"],
                               env={'PATH': "${HOME}/deployment/docker/selenium:${PATH}"}))

from buildbot.config import BuilderConfig

c['builders'] = []
c['builders'].append(
    BuilderConfig(name="lone-builder",
                  workernames=["lonelySlave"],
                  factory=lonelyness))
c['builders'].append(
    BuilderConfig(name="lcov-build",
                  workernames=["lcovSlave"],
                  factory=lcov))
c['builders'].append(
    BuilderConfig(name="auto-click",
                  workernames=["containersSlave"],
                  factory=autoClick))


####### STATUS TARGETS

c['status'] = []
from buildbot.plugins import util

c['www'] = dict(port=8010,
                plugins=dict(waterfall_view={},
                console_view={}),
		auth=util.UserPasswordAuth({"marcello": "taler"}))

####### PROJECT IDENTITY
c['title'] = "Taler"
c['titleURL'] = "https://taler.net/"

c['buildbotURL'] = "https://buildbot.taler.net/"

####### DB URL
c['db'] = {
    'db_url' : "sqlite:///state.sqlite",
}