From 8a88dbe1739d23eb6003d2f2cbe49fd260f7727e Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 15 Feb 2016 20:14:31 +0100 Subject: s 2 buildbot: use new nixpkgs compat structure --- shared/2configs/shared-buildbot.nix | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'shared') diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix index ebf5f4a1e..eff44b280 100644 --- a/shared/2configs/shared-buildbot.nix +++ b/shared/2configs/shared-buildbot.nix @@ -69,7 +69,7 @@ # SSL_CERT_FILE,LOGNAME,NIX_REMOTE nixshell = ["nix-shell", "-I", "stockholm=.", - "-I", "nixpkgs=/var/src/upstream-nixpkgs", + "-I", "nixpkgs=/var/src/nixpkgs", "-p" ] + deps + [ "--run" ] # prepare addShell function @@ -90,21 +90,21 @@ addShell(f,name="instantiate-test-all-modules",env=env, command=nixshell + \ ["touch retiolum.rsa_key.priv; \ - nix-instantiate --eval -A \ - users.shared.test-all-krebs-modules.system \ - -I stockholm=. \ - --show-trace \ - -I secrets=. '' \ - --strict --json"]) + nix-instantiate \ + --show-trace --eval --strict --json \ + -I nixos-config=./shared/1systems/test-all-krebs-modules.nix \ + -I secrets=. \ + -A config.system.build.toplevel"] + ) - addShell(f,name="instantiate-test-minimal-deploy",env=env, + addShell(f,name="build-test-minimal",env=env, command=nixshell + \ - ["nix-instantiate --eval -A \ - users.shared.test-minimal-deploy.system \ - -I stockholm=. \ - -I secrets=. '' \ - --show-trace \ - --strict --json"]) + ["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, @@ -151,6 +151,6 @@ packages = with pkgs;[ git nix ]; # all nix commands will need a working nixpkgs installation extraEnviron = { - NIX_PATH="nixpkgs=/var/src/upstream-nixpkgs:nixos-config=./shared/1systems/wolf.nix"; }; + NIX_PATH="nixpkgs=/var/src/nixpkgs:nixos-config=./shared/1systems/wolf.nix"; }; }; } -- cgit v1.2.3 From 5d98f98b8df7dc40b0b76a3d5b6b6545493309bb Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 16 Feb 2016 18:03:18 +0100 Subject: s 2 buildbot: add auto-gc --- shared/2configs/shared-buildbot.nix | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'shared') diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix index eff44b280..b474af7b3 100644 --- a/shared/2configs/shared-buildbot.nix +++ b/shared/2configs/shared-buildbot.nix @@ -7,6 +7,11 @@ # TODO for all users schedule a build for fast tests { + # due to the fact that we actually build stuff on the box via the daemon, + # /nix/store should be cleaned up automatically as well + nix.gc.automatic = true; + nix.gc.dates = "05:23"; + networking.firewall.allowedTCPPorts = [ 8010 9989 ]; krebs.buildbot.master = let stockholm-mirror-url = http://cgit.wolf/stockholm-mirror ; @@ -27,7 +32,7 @@ force-scheduler = '' sched.append(schedulers.ForceScheduler( name="force", - builderNames=["full-tests","fast-tests"])) + builderNames=["full-tests","fast-tests","build-local"])) ''; fast-tests-scheduler = '' # test everything real quick @@ -35,7 +40,7 @@ ## all branches change_filter=util.ChangeFilter(branch_re=".*"), # treeStableTimer=10, - name="fast-test-all-branches", + name="fast-all-branches", builderNames=["fast-tests"])) ''; test-cac-infest-master = '' @@ -51,8 +56,8 @@ change_filter=util.ChangeFilter(branch="master"), fileIsImportant=shared_files, treeStableTimer=60*60, # master was stable for the last hour - name="full-master-test", - builderNames=["full-tests"])) + name="full-master", + builderNames=["full-tests","build-local"])) ''; }; builder_pre = '' @@ -110,6 +115,26 @@ slavenames=slavenames, factory=f)) ''; + # this build will try to build against local nixpkgs + # TODO change to do a 'local' populate and use the retrieved nixpkgs + build-local = '' + f = util.BuildFactory() + f.addStep(grab_repo) + + addShell(f,name="build-test-all-modules",env=env, + command=nixshell + \ + ["touch retiolum.rsa_key.priv; \ + nix-build \ + --show-trace --no-out-link \ + -I nixos-config=./shared/1systems/test-all-krebs-modules.nix \ + -I secrets=. \ + -A config.system.build.toplevel"] + ) + + bu.append(util.BuilderConfig(name="build-local", + slavenames=slavenames, + factory=f)) + ''; slow-tests = '' s = util.BuildFactory() s.addStep(grab_repo) -- cgit v1.2.3