From c1957eb83f64d3910c7680d3f4048d7da1b486f5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 3 Aug 2016 08:19:47 +0200 Subject: l 2 buildbot: use make for fast-tests --- lass/2configs/buildbot-standalone.nix | 41 ++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 10 deletions(-) (limited to 'lass/2configs/buildbot-standalone.nix') diff --git a/lass/2configs/buildbot-standalone.nix b/lass/2configs/buildbot-standalone.nix index 766fd715e..1db3ffd1f 100644 --- a/lass/2configs/buildbot-standalone.nix +++ b/lass/2configs/buildbot-standalone.nix @@ -66,6 +66,11 @@ in { "NIX_REMOTE": "daemon", "dummy_secrets": "true", } + env_shared = { + "LOGNAME": "shared", + "NIX_REMOTE": "daemon", + "dummy_secrets": "true", + } # prepare nix-shell # the dependencies which are used by the test script @@ -114,19 +119,35 @@ in { fast-tests = '' f = util.BuildFactory() f.addStep(grab_repo) - for i in [ "prism", "mors", "echelon" ]: - addShell(f,name="populate-{}".format(i),env=env_lass, + for i in [ "mors", "uriel", "shodan", "helios", "cloudkrebs", "echelon", "dishfire", "prism" ]: + addShell(f,name="build-{}".format(i),env=env_lass, + command=nixshell + \ + ["make \ + test \ + ssh=${sshWrapper} \ + target=build@localhost${config.users.users.build.home}/testbuild \ + method=eval \ + system={}".format(i)]) + + for i in [ "x", "wry", "vbob", "wbob", "shoney" ]: + addShell(f,name="build-{}".format(i),env=env_makefu, command=nixshell + \ - ["{}(make system={} populate debug=true)".format("!" if "failing" in i else "",i)]) + ["make \ + test \ + ssh=${sshWrapper} \ + target=build@localhost${config.users.users.build.home}/testbuild \ + method=eval \ + system={}".format(i)]) - addShell(f,name="build-test-minimal",env=env_lass, + for i in [ "test-minimal-deploy" ]: + addShell(f,name="build-{}".format(i),env=env_shared, 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"] - ) + ["make \ + test \ + ssh=${sshWrapper} \ + target=build@localhost${config.users.users.build.home}/testbuild \ + method=eval \ + system={}".format(i)]) bu.append(util.BuilderConfig(name="fast-tests", slavenames=slavenames, -- cgit v1.2.3 From 3602962200eadaa4f6748bf00cc6b92e188ce964 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 4 Aug 2016 23:59:12 +0200 Subject: l 2 buildbotMaster: don't use ssh anymore --- lass/2configs/buildbot-standalone.nix | 37 ++++++++++++++++------------------- 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'lass/2configs/buildbot-standalone.nix') diff --git a/lass/2configs/buildbot-standalone.nix b/lass/2configs/buildbot-standalone.nix index 1db3ffd1f..90a990339 100644 --- a/lass/2configs/buildbot-standalone.nix +++ b/lass/2configs/buildbot-standalone.nix @@ -8,9 +8,6 @@ let ControlPath /tmp/%u_sshmux_%r@%h:%p ControlPersist 4h ''; - sshWrapper = pkgs.writeDash "ssh-wrapper" '' - ${pkgs.openssh}/bin/ssh -F ${sshHostConfig} -i ${shell.escape config.lass.build-ssh-privkey.path} "$@" - ''; in { config.krebs.buildbot.master = let @@ -74,7 +71,7 @@ in { # prepare nix-shell # the dependencies which are used by the test script - deps = [ "gnumake", "jq", "nix", "(import ).pkgs.populate" ] + deps = [ "gnumake", "jq", "nix", "(import ).pkgs.populate", "openssh" ] # TODO: --pure , prepare ENV in nix-shell command: # SSL_CERT_FILE,LOGNAME,NIX_REMOTE nixshell = ["nix-shell", @@ -93,20 +90,20 @@ in { for i in [ "mors", "uriel", "shodan", "helios", "cloudkrebs", "echelon", "dishfire", "prism" ]: addShell(f,name="build-{}".format(i),env=env_lass, command=nixshell + \ - ["make \ + ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ + make \ test \ - ssh=${sshWrapper} \ - target=build@localhost${config.users.users.build.home}/testbuild \ + target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ method=build \ system={}".format(i)]) for i in [ "x", "wry", "vbob", "wbob", "shoney" ]: addShell(f,name="build-{}".format(i),env=env_makefu, command=nixshell + \ - ["make \ + ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ + make \ test \ - ssh=${sshWrapper} \ - target=build@localhost${config.users.users.build.home}/testbuild \ + target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ method=build \ system={}".format(i)]) @@ -122,30 +119,30 @@ in { for i in [ "mors", "uriel", "shodan", "helios", "cloudkrebs", "echelon", "dishfire", "prism" ]: addShell(f,name="build-{}".format(i),env=env_lass, command=nixshell + \ - ["make \ + ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ + make \ test \ - ssh=${sshWrapper} \ - target=build@localhost${config.users.users.build.home}/testbuild \ + target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ method=eval \ system={}".format(i)]) for i in [ "x", "wry", "vbob", "wbob", "shoney" ]: addShell(f,name="build-{}".format(i),env=env_makefu, command=nixshell + \ - ["make \ + ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ + make \ test \ - ssh=${sshWrapper} \ - target=build@localhost${config.users.users.build.home}/testbuild \ + target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ method=eval \ system={}".format(i)]) - for i in [ "test-minimal-deploy" ]: + for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf" ]: addShell(f,name="build-{}".format(i),env=env_shared, command=nixshell + \ - ["make \ + ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ + make \ test \ - ssh=${sshWrapper} \ - target=build@localhost${config.users.users.build.home}/testbuild \ + target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ method=eval \ system={}".format(i)]) -- cgit v1.2.3