summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-06-20 01:08:42 +0200
committerlassulus <lass@lassul.us>2017-06-20 16:06:50 +0200
commitc6b9ff9424232fe20818ec586ee20c8b67bdec69 (patch)
treef549676a15e45726b74fa28a8bda9f4a1b1fee72 /lass
parente199701099d8582619da404953dd0424a138ae97 (diff)
l 2 buildbot: introduce build_host function
Diffstat (limited to 'lass')
-rw-r--r--lass/2configs/buildbot-standalone.nix47
1 files changed, 15 insertions, 32 deletions
diff --git a/lass/2configs/buildbot-standalone.nix b/lass/2configs/buildbot-standalone.nix
index 11eb9052e..6b8901904 100644
--- a/lass/2configs/buildbot-standalone.nix
+++ b/lass/2configs/buildbot-standalone.nix
@@ -103,45 +103,28 @@ in {
build-hosts = ''
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 $HOME/$LOGNAME && touch $HOME/$LOGNAME/.populate; \
- make NIX_PATH=$HOME/$LOGNAME test method=build \
- target=buildbotworker@${config.krebs.build.host.name}$HOME/$LOGNAME \
- system={}".format(i)
- ]
+
+ def build_host(env, host):
+ addShell(f,name="build-{}".format(i),env=env,
+ command=nixshell + ["mkdir -p $HOME/$LOGNAME && touch $HOME/$LOGNAME/.populate; \
+ echo $HOME; echo $LOGNAME; \
+ test -e $HOME/$LOGNAME/nixpkgs || cp -r /var/src/nixpkgs $HOME/$LOGNAME/; \
+ make NIX_PATH=$HOME/$LOGNAME:secrets=/var/src/stockholm/null test method=build \
+ target=buildbotworker@${config.krebs.build.host.name}$HOME/$LOGNAME \
+ system={}".format(host)]
)
for i in [ "mors", "uriel", "shodan", "icarus", "cloudkrebs", "echelon", "dishfire", "prism" ]:
- addShell(f,name="build-{}".format(i),env=env_lass,
- command=nixshell + \
- ["mkdir -p $HOME/$LOGNAME && touch $HOME/$LOGNAME/.populate; \
- make NIX_PATH=$HOME/$LOGNAME test method=build \
- target=buildbotworker@${config.krebs.build.host.name}$HOME/$LOGNAME \
- system={}".format(i)
- ]
- )
+ build_host(env_lass, i)
for i in [ "x", "wry", "vbob", "wbob", "shoney" ]:
- addShell(f,name="build-{}".format(i),env=env_makefu,
- command=nixshell + \
- ["mkdir -p $HOME/$LOGNAME && touch $HOME/$LOGNAME/.populate; \
- make NIX_PATH=$HOME/$LOGNAME test method=build \
- target=buildbotworker@${config.krebs.build.host.name}$HOME/$LOGNAME \
- system={}".format(i)
- ]
- )
+ build_host(env_makefu, i)
for i in [ "hiawatha", "onondaga" ]:
- addShell(f,name="build-{}".format(i),env=env_nin,
- command=nixshell + \
- ["mkdir -p $HOME/$LOGNAME && touch $HOME/$LOGNAME/.populate; \
- make NIX_PATH=$HOME/$LOGNAME test method=build \
- target=buildbotworker@${config.krebs.build.host.name}$HOME/$LOGNAME \
- system={}".format(i)
- ]
- )
+ build_host(env_nin, i)
+
+ for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7" ]:
+ build_host(env_shared, i)
bu.append(
util.BuilderConfig(