m 3 buildbot.master: add fast and full tests
This commit is contained in:
parent
9f32e2d913
commit
c623555592
|
@ -25,50 +25,71 @@ let
|
||||||
stockholm_repo,
|
stockholm_repo,
|
||||||
workdir='stockholm-poller', branch='master',
|
workdir='stockholm-poller', branch='master',
|
||||||
project='stockholm',
|
project='stockholm',
|
||||||
pollinterval=300))
|
pollinterval=120))
|
||||||
|
|
||||||
####### Build Scheduler
|
####### Build Scheduler
|
||||||
# TODO: configure scheduler
|
# TODO: configure scheduler
|
||||||
important_files = util.ChangeFilter(
|
|
||||||
project_re="^((krebs|share)/.*|Makefile|default.nix)",
|
|
||||||
branch='master')
|
|
||||||
c['schedulers'] = []
|
c['schedulers'] = []
|
||||||
c['schedulers'].append(schedulers.SingleBranchScheduler(
|
|
||||||
name="all-important-files",
|
# test the master real quick
|
||||||
change_filter=important_files,
|
fast = schedulers.SingleBranchScheduler(
|
||||||
# 3 minutes stable tree
|
change_filter=util.ChangeFilter(branch="master"),
|
||||||
treeStableTimer=3*60,
|
name="fast-master-test",
|
||||||
builderNames=["runtests"]))
|
builderNames=["fast-tests"])
|
||||||
c['schedulers'].append(schedulers.ForceScheduler(
|
|
||||||
|
force = schedulers.ForceScheduler(
|
||||||
name="force",
|
name="force",
|
||||||
builderNames=["runtests"]))
|
builderNames=["full-tests"])
|
||||||
|
|
||||||
|
# files everyone depends on or are part of the share branch
|
||||||
|
def shared_files(change):
|
||||||
|
import re
|
||||||
|
r =re.compile("^((krebs|share)/.*|Makefile|default.nix)")
|
||||||
|
for file in change.files:
|
||||||
|
if r.match(file):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
full = schedulers.SingleBranchScheduler(
|
||||||
|
change_filter=util.ChangeFilter(branch="master"),
|
||||||
|
fileIsImportant=shared_files,
|
||||||
|
name="full-master-test",
|
||||||
|
builderNames=["full-tests"])
|
||||||
|
c['schedulers'] = [ fast, force, full ]
|
||||||
###### The actual build
|
###### The actual build
|
||||||
|
# couple of fast steps:
|
||||||
f = util.BuildFactory()
|
f = util.BuildFactory()
|
||||||
f.addStep(steps.Git(repourl=stockholm_repo, mode='incremental'))
|
## fetch repo
|
||||||
|
grab_repo = steps.Git(repourl=stockholm_repo, mode='incremental')
|
||||||
|
f.addStep(grab_repo)
|
||||||
|
|
||||||
# the dependencies which are used by the test script
|
# the dependencies which are used by the test script
|
||||||
deps = [ "gnumake", "jq" ]
|
deps = [ "gnumake", "jq" ]
|
||||||
nixshell = ["nix-shell", "-p" ] + deps + [ "--run" ]
|
nixshell = ["nix-shell", "-p" ] + deps + [ "--run" ]
|
||||||
def addShell(**kwargs):
|
def addShell(f,**kwargs):
|
||||||
f.addStep(steps.ShellCommand(**kwargs))
|
f.addStep(steps.ShellCommand(**kwargs))
|
||||||
|
|
||||||
# TODO: combined strings somewhat defeat the reason why an array was used in first place
|
addShell(f,name="centos7-eval",env={"LOGNAME": "shared",
|
||||||
addShell(name=env={"LOGNAME": "shared",
|
|
||||||
"get" : "krebs.deploy",
|
"get" : "krebs.deploy",
|
||||||
"filter" : "json"
|
"filter" : "json"
|
||||||
},
|
},
|
||||||
command=nixshell + ["make -s eval system=test-centos7"])
|
command=nixshell + ["make -s eval system=test-centos7"])
|
||||||
addShell(env={"LOGNAME": "shared",
|
|
||||||
|
addShell(f,name="wolf-eval",env={"LOGNAME": "shared",
|
||||||
"get" : "krebs.deploy",
|
"get" : "krebs.deploy",
|
||||||
"filter" : "json"
|
"filter" : "json"
|
||||||
},
|
},
|
||||||
command=nixshell + ["make -s eval system=wolf"])
|
command=nixshell + ["make -s eval system=wolf"])
|
||||||
|
|
||||||
# TODO: different Builders?
|
|
||||||
c['builders'] = []
|
c['builders'] = []
|
||||||
c['builders'].append(
|
c['builders'].append(
|
||||||
util.BuilderConfig(name="runtests",
|
util.BuilderConfig(name="fast-tests",
|
||||||
# TODO: only some slaves being used in builder?
|
slavenames=slavenames,
|
||||||
|
factory=f))
|
||||||
|
|
||||||
|
# TODO slow build
|
||||||
|
c['builders'].append(
|
||||||
|
util.BuilderConfig(name="full-tests",
|
||||||
slavenames=slavenames,
|
slavenames=slavenames,
|
||||||
factory=f))
|
factory=f))
|
||||||
|
|
||||||
|
@ -111,7 +132,9 @@ let
|
||||||
c['title'] = "Stockholm"
|
c['title'] = "Stockholm"
|
||||||
c['titleURL'] = "http://krebsco.de"
|
c['titleURL'] = "http://krebsco.de"
|
||||||
|
|
||||||
c['buildbotURL'] = "http://buildbot.krebsco.de/"
|
#c['buildbotURL'] = "http://buildbot.krebsco.de/"
|
||||||
|
# TODO: configure url
|
||||||
|
c['buildbotURL'] = "http://vbob:8010/"
|
||||||
|
|
||||||
####### DB URL
|
####### DB URL
|
||||||
c['db'] = {
|
c['db'] = {
|
||||||
|
@ -124,7 +147,6 @@ let
|
||||||
|
|
||||||
api = {
|
api = {
|
||||||
enable = mkEnableOption "Buildbot Master";
|
enable = mkEnableOption "Buildbot Master";
|
||||||
|
|
||||||
workDir = mkOption {
|
workDir = mkOption {
|
||||||
default = "/var/lib/buildbot/master";
|
default = "/var/lib/buildbot/master";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -169,6 +191,7 @@ let
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
|
|
Loading…
Reference in a new issue