2 buildbot-standalone: make everything work again
This commit is contained in:
parent
c7a6e74b3d
commit
22a9fcdf8e
|
@ -1,15 +1,16 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
#networking.firewall.allowedTCPPorts = [ 8010 9989 ];
|
||||
krebs.buildbot.master = {
|
||||
krebs.buildbot.master = let
|
||||
stockholm-mirror-url = http://cgit.prism/stockholm ;
|
||||
in {
|
||||
slaves = {
|
||||
testslave = "lasspass";
|
||||
};
|
||||
change_source.stockholm = ''
|
||||
stockholm_repo = 'http://cgit.mors/stockholm'
|
||||
stockholm_repo = '${stockholm-mirror-url}'
|
||||
cs.append(changes.GitPoller(
|
||||
stockholm_repo,
|
||||
workdir='stockholm-poller', branch='master',
|
||||
workdir='stockholm-poller', branches=True,
|
||||
project='stockholm',
|
||||
pollinterval=120))
|
||||
'';
|
||||
|
@ -20,10 +21,12 @@
|
|||
builderNames=["fast-tests"]))
|
||||
'';
|
||||
fast-tests-scheduler = ''
|
||||
# test the master real quick
|
||||
# test everything real quick
|
||||
sched.append(schedulers.SingleBranchScheduler(
|
||||
change_filter=util.ChangeFilter(branch="master"),
|
||||
name="fast-master-test",
|
||||
## all branches
|
||||
change_filter=util.ChangeFilter(branch_re=".*"),
|
||||
# treeStableTimer=10,
|
||||
name="fast-all-branches",
|
||||
builderNames=["fast-tests"]))
|
||||
'';
|
||||
};
|
||||
|
@ -38,7 +41,10 @@
|
|||
deps = [ "gnumake", "jq","nix","rsync" ]
|
||||
# TODO: --pure , prepare ENV in nix-shell command:
|
||||
# SSL_CERT_FILE,LOGNAME,NIX_REMOTE
|
||||
nixshell = ["nix-shell", "-I", "stockholm=.", "-p" ] + deps + [ "--run" ]
|
||||
nixshell = ["nix-shell",
|
||||
"-I", "stockholm=.",
|
||||
"-I", "nixpkgs=/var/src/nixpkgs",
|
||||
"-p" ] + deps + [ "--run" ]
|
||||
|
||||
# prepare addShell function
|
||||
def addShell(factory,**kwargs):
|
||||
|
@ -48,12 +54,25 @@
|
|||
fast-tests = ''
|
||||
f = util.BuildFactory()
|
||||
f.addStep(grab_repo)
|
||||
addShell(f,name="mors-eval",env=env,
|
||||
command=nixshell + ["make -s eval get=krebs.deploy filter=json system=mors"])
|
||||
for i in [ "prism", "mors", "echelon" ]:
|
||||
addShell(f,name="populate-{}".format(i),env=env,
|
||||
command=nixshell + \
|
||||
["{}( make system={} eval.config.krebs.build.populate \
|
||||
| jq -er .)".format("!" if "failing" in i else "",i)])
|
||||
|
||||
addShell(f,name="build-test-minimal",env=env,
|
||||
command=nixshell + \
|
||||
["nix-instantiate \
|
||||
--show-trace --eval --strict --json \
|
||||
-I nixos-config=./shared/1systems/test-minimal-deploy.nix \
|
||||
-I secrets=. \
|
||||
-A config.system.build.toplevel"]
|
||||
)
|
||||
|
||||
bu.append(util.BuilderConfig(name="fast-tests",
|
||||
slavenames=slavenames,
|
||||
factory=f))
|
||||
|
||||
'';
|
||||
};
|
||||
enable = true;
|
||||
|
@ -72,7 +91,17 @@
|
|||
masterhost = "localhost";
|
||||
username = "testslave";
|
||||
password = "lasspass";
|
||||
packages = with pkgs;[ git nix ];
|
||||
extraEnviron = { NIX_PATH="nixpkgs=${toString <nixpkgs>}"; };
|
||||
packages = with pkgs;[ git nix gnumake jq rsync ];
|
||||
extraEnviron = {
|
||||
NIX_PATH="nixpkgs=/var/src/nixpkgs:nixos-config=./shared/1systems/wolf.nix";
|
||||
};
|
||||
};
|
||||
krebs.iptables = {
|
||||
tables = {
|
||||
filter.INPUT.rules = [
|
||||
{ predicate = "-p tcp --dport 8010"; target = "ACCEPT"; }
|
||||
{ predicate = "-p tcp --dport 9989"; target = "ACCEPT"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue