From 5518fcf25a4872bdca797bd830aebe8570aa2915 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 28 Nov 2016 23:24:47 +0100 Subject: l 2 buildbot: fix indentation --- lass/2configs/buildbot-standalone.nix | 74 +++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 24 deletions(-) (limited to 'lass/2configs/buildbot-standalone.nix') diff --git a/lass/2configs/buildbot-standalone.nix b/lass/2configs/buildbot-standalone.nix index e7fbccb77..9ff96089b 100644 --- a/lass/2configs/buildbot-standalone.nix +++ b/lass/2configs/buildbot-standalone.nix @@ -18,25 +18,34 @@ in { }; change_source.stockholm = '' stockholm_repo = '${stockholm-mirror-url}' - cs.append(changes.GitPoller( + cs.append( + changes.GitPoller( stockholm_repo, workdir='stockholm-poller', branches=True, project='stockholm', - pollinterval=120)) + pollinterval=120 + ) + ) ''; scheduler = { build-scheduler = '' # build all hosts - sched.append(schedulers.SingleBranchScheduler( - change_filter=util.ChangeFilter(branch_re=".*"), - treeStableTimer=10, - name="build-all-branches", - builderNames=["build-all", "build-pkgs"])) + sched.append( + schedulers.SingleBranchScheduler( + change_filter=util.ChangeFilter(branch_re=".*"), + treeStableTimer=10, + name="build-all-branches", + builderNames=["build-all", "build-pkgs"] + ) + ) ''; }; builder_pre = '' # prepare grab_repo step for stockholm - grab_repo = steps.Git(repourl=stockholm_repo, mode='full') + grab_repo = steps.Git( + repourl=stockholm_repo, + mode='full' + ) # TODO: get nixpkgs/stockholm paths from krebs env_lass = { @@ -57,13 +66,21 @@ in { # prepare nix-shell # the dependencies which are used by the test script - deps = [ "gnumake", "jq", "nix", "(import ).pkgs.populate", "openssh" ] + 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", - "-I", "stockholm=.", - "-I", "nixpkgs=/var/src/nixpkgs", - "-p" ] + deps + [ "--run" ] + nixshell = [ + "nix-shell", + "-I", "stockholm=.", + "-I", "nixpkgs=/var/src/nixpkgs", + "-p" + ] + deps + [ "--run" ] # prepare addShell function def addShell(factory,**kwargs): @@ -73,29 +90,38 @@ in { build-all = '' f = util.BuildFactory() f.addStep(grab_repo) + for i in [ "mors", "uriel", "shodan", "helios", "cloudkrebs", "echelon", "dishfire", "prism" ]: - addShell(f,name="build-{}".format(i),env=env_lass, - command=nixshell + \ - ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ + addShell(f,name="build-{}".format(i),env=env_lass, + command=nixshell + \ + ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ make \ test \ target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ method=build \ - system={}".format(i)]) + system={}".format(i) + ] + ) for i in [ "x", "wry", "vbob", "wbob", "shoney" ]: - addShell(f,name="build-{}".format(i),env=env_makefu, - command=nixshell + \ - ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ + addShell(f,name="build-{}".format(i),env=env_makefu, + command=nixshell + \ + ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ make \ test \ target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ method=build \ - system={}".format(i)]) + system={}".format(i) + ] + ) - bu.append(util.BuilderConfig(name="build-all", - workernames=workernames, - factory=f)) + bu.append( + util.BuilderConfig( + name="build-all", + workernames=workernames, + factory=f + ) + ) ''; -- cgit v1.2.3 From f55fceaa63d9f830a70d031fdde360c1862bbd32 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 29 Nov 2016 13:56:59 +0100 Subject: l 2 buildbot: add shared hosts to build-all --- lass/2configs/buildbot-standalone.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lass/2configs/buildbot-standalone.nix') diff --git a/lass/2configs/buildbot-standalone.nix b/lass/2configs/buildbot-standalone.nix index 9ff96089b..23dd0ae09 100644 --- a/lass/2configs/buildbot-standalone.nix +++ b/lass/2configs/buildbot-standalone.nix @@ -90,6 +90,17 @@ in { build-all = '' f = util.BuildFactory() f.addStep(grab_repo) + for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7" ]: + addShell(f,name="build-{}".format(i),env=env_shared, + command=nixshell + \ + ["mkdir -p /tmp/testbuild/$LOGNAME && touch /tmp/testbuild/$LOGNAME/.populate; \ + make \ + test \ + target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ + method=build \ + system={}".format(i) + ] + ) for i in [ "mors", "uriel", "shodan", "helios", "cloudkrebs", "echelon", "dishfire", "prism" ]: addShell(f,name="build-{}".format(i),env=env_lass, -- cgit v1.2.3 From dbc68c5e1bc0ff9ee2b5674098a6221255a03f61 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 29 Nov 2016 11:15:57 +0100 Subject: l 2 buildbot: rename build-all -> build-hosts --- lass/2configs/buildbot-standalone.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lass/2configs/buildbot-standalone.nix') diff --git a/lass/2configs/buildbot-standalone.nix b/lass/2configs/buildbot-standalone.nix index 23dd0ae09..72cd66420 100644 --- a/lass/2configs/buildbot-standalone.nix +++ b/lass/2configs/buildbot-standalone.nix @@ -35,7 +35,7 @@ in { change_filter=util.ChangeFilter(branch_re=".*"), treeStableTimer=10, name="build-all-branches", - builderNames=["build-all", "build-pkgs"] + builderNames=["build-hosts", "build-pkgs"] ) ) ''; @@ -87,7 +87,7 @@ in { factory.addStep(steps.ShellCommand(**kwargs)) ''; builder = { - build-all = '' + build-hosts = '' f = util.BuildFactory() f.addStep(grab_repo) for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7" ]: @@ -128,7 +128,7 @@ in { bu.append( util.BuilderConfig( - name="build-all", + name="build-hosts", workernames=workernames, factory=f ) -- cgit v1.2.3