m 3 buildbot.master: add deps, refactor
This commit is contained in:
parent
bdc9f6f188
commit
87694e24df
@ -43,14 +43,26 @@ let
|
|||||||
name="force",
|
name="force",
|
||||||
builderNames=["runtests"]))
|
builderNames=["runtests"]))
|
||||||
###### The actual build
|
###### The actual build
|
||||||
factory = util.BuildFactory()
|
f = util.BuildFactory()
|
||||||
factory.addStep(steps.Git(repourl=stockholm_repo, mode='incremental'))
|
f.addStep(steps.Git(repourl=stockholm_repo, mode='incremental'))
|
||||||
|
|
||||||
|
# the dependencies which are used by the test script
|
||||||
deps = [ "gnumake", "jq" ]
|
deps = [ "gnumake", "jq" ]
|
||||||
factory.addStep(steps.ShellCommand(command=["nix-shell", "-p" ] + deps ))
|
nixshell = ["nix-shell", "-p" ] + deps + [ "--run" ]
|
||||||
factory.addStep(steps.ShellCommand(env={"LOGNAME": "shared"},
|
def addShell(**kwargs):
|
||||||
command=["make", "get=krebs.deploy",
|
f.addStep(steps.ShellCommand(**kwargs))
|
||||||
"system=test-centos7"]))
|
|
||||||
|
# TODO: combined strings somewhat defeat the reason why an array was used in first place
|
||||||
|
addShell(name=env={"LOGNAME": "shared",
|
||||||
|
"get" : "krebs.deploy",
|
||||||
|
"filter" : "json"
|
||||||
|
},
|
||||||
|
command=nixshell + ["make -s eval system=test-centos7"])
|
||||||
|
addShell(env={"LOGNAME": "shared",
|
||||||
|
"get" : "krebs.deploy",
|
||||||
|
"filter" : "json"
|
||||||
|
},
|
||||||
|
command=nixshell + ["make -s eval system=wolf"])
|
||||||
|
|
||||||
# TODO: different Builders?
|
# TODO: different Builders?
|
||||||
c['builders'] = []
|
c['builders'] = []
|
||||||
@ -58,7 +70,7 @@ let
|
|||||||
util.BuilderConfig(name="runtests",
|
util.BuilderConfig(name="runtests",
|
||||||
# TODO: only some slaves being used in builder?
|
# TODO: only some slaves being used in builder?
|
||||||
slavenames=slavenames,
|
slavenames=slavenames,
|
||||||
factory=factory))
|
factory=f))
|
||||||
|
|
||||||
####### Status of Builds
|
####### Status of Builds
|
||||||
c['status'] = []
|
c['status'] = []
|
||||||
@ -183,8 +195,10 @@ let
|
|||||||
description = "Buildbot Master";
|
description = "Buildbot Master";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
path = [ pkgs.git ];
|
||||||
serviceConfig = let
|
serviceConfig = let
|
||||||
workdir="${lib.shell.escape cfg.workDir}";
|
workdir="${lib.shell.escape cfg.workDir}";
|
||||||
|
# TODO: check if git is the only dep
|
||||||
in {
|
in {
|
||||||
PermissionsStartOnly = true;
|
PermissionsStartOnly = true;
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
|
Loading…
Reference in New Issue
Block a user