l 2 buildbot: introduce build_host function

This commit is contained in:
lassulus 2017-06-20 01:08:42 +02:00
parent e199701099
commit c6b9ff9424

View File

@ -103,45 +103,28 @@ in {
build-hosts = '' build-hosts = ''
f = util.BuildFactory() f = util.BuildFactory()
f.addStep(grab_repo) 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, def build_host(env, host):
command=nixshell + \ addShell(f,name="build-{}".format(i),env=env,
["mkdir -p $HOME/$LOGNAME && touch $HOME/$LOGNAME/.populate; \ command=nixshell + ["mkdir -p $HOME/$LOGNAME && touch $HOME/$LOGNAME/.populate; \
make NIX_PATH=$HOME/$LOGNAME test method=build \ echo $HOME; echo $LOGNAME; \
target=buildbotworker@${config.krebs.build.host.name}$HOME/$LOGNAME \ test -e $HOME/$LOGNAME/nixpkgs || cp -r /var/src/nixpkgs $HOME/$LOGNAME/; \
system={}".format(i) 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" ]: for i in [ "mors", "uriel", "shodan", "icarus", "cloudkrebs", "echelon", "dishfire", "prism" ]:
addShell(f,name="build-{}".format(i),env=env_lass, build_host(env_lass, i)
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)
]
)
for i in [ "x", "wry", "vbob", "wbob", "shoney" ]: for i in [ "x", "wry", "vbob", "wbob", "shoney" ]:
addShell(f,name="build-{}".format(i),env=env_makefu, build_host(env_makefu, i)
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)
]
)
for i in [ "hiawatha", "onondaga" ]: for i in [ "hiawatha", "onondaga" ]:
addShell(f,name="build-{}".format(i),env=env_nin, build_host(env_nin, i)
command=nixshell + \
["mkdir -p $HOME/$LOGNAME && touch $HOME/$LOGNAME/.populate; \ for i in [ "test-minimal-deploy", "test-all-krebs-modules", "wolf", "test-centos7" ]:
make NIX_PATH=$HOME/$LOGNAME test method=build \ build_host(env_shared, i)
target=buildbotworker@${config.krebs.build.host.name}$HOME/$LOGNAME \
system={}".format(i)
]
)
bu.append( bu.append(
util.BuilderConfig( util.BuilderConfig(