l 2 buildbot: fix indentation

This commit is contained in:
lassulus 2016-11-28 23:24:47 +01:00
parent d8da51621e
commit 5518fcf25a

View File

@ -18,25 +18,34 @@ in {
}; };
change_source.stockholm = '' change_source.stockholm = ''
stockholm_repo = '${stockholm-mirror-url}' stockholm_repo = '${stockholm-mirror-url}'
cs.append(changes.GitPoller( cs.append(
changes.GitPoller(
stockholm_repo, stockholm_repo,
workdir='stockholm-poller', branches=True, workdir='stockholm-poller', branches=True,
project='stockholm', project='stockholm',
pollinterval=120)) pollinterval=120
)
)
''; '';
scheduler = { scheduler = {
build-scheduler = '' build-scheduler = ''
# build all hosts # build all hosts
sched.append(schedulers.SingleBranchScheduler( sched.append(
schedulers.SingleBranchScheduler(
change_filter=util.ChangeFilter(branch_re=".*"), change_filter=util.ChangeFilter(branch_re=".*"),
treeStableTimer=10, treeStableTimer=10,
name="build-all-branches", name="build-all-branches",
builderNames=["build-all", "build-pkgs"])) builderNames=["build-all", "build-pkgs"]
)
)
''; '';
}; };
builder_pre = '' builder_pre = ''
# prepare grab_repo step for stockholm # 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 # TODO: get nixpkgs/stockholm paths from krebs
env_lass = { env_lass = {
@ -57,13 +66,21 @@ in {
# prepare nix-shell # prepare nix-shell
# the dependencies which are used by the test script # the dependencies which are used by the test script
deps = [ "gnumake", "jq", "nix", "(import <stockholm>).pkgs.populate", "openssh" ] deps = [
"gnumake",
"jq",
"nix",
"(import <stockholm>).pkgs.populate",
"openssh"
]
# TODO: --pure , prepare ENV in nix-shell command: # TODO: --pure , prepare ENV in nix-shell command:
# SSL_CERT_FILE,LOGNAME,NIX_REMOTE # SSL_CERT_FILE,LOGNAME,NIX_REMOTE
nixshell = ["nix-shell", nixshell = [
"nix-shell",
"-I", "stockholm=.", "-I", "stockholm=.",
"-I", "nixpkgs=/var/src/nixpkgs", "-I", "nixpkgs=/var/src/nixpkgs",
"-p" ] + deps + [ "--run" ] "-p"
] + deps + [ "--run" ]
# prepare addShell function # prepare addShell function
def addShell(factory,**kwargs): def addShell(factory,**kwargs):
@ -73,6 +90,7 @@ in {
build-all = '' build-all = ''
f = util.BuildFactory() f = util.BuildFactory()
f.addStep(grab_repo) f.addStep(grab_repo)
for i in [ "mors", "uriel", "shodan", "helios", "cloudkrebs", "echelon", "dishfire", "prism" ]: for i in [ "mors", "uriel", "shodan", "helios", "cloudkrebs", "echelon", "dishfire", "prism" ]:
addShell(f,name="build-{}".format(i),env=env_lass, addShell(f,name="build-{}".format(i),env=env_lass,
command=nixshell + \ command=nixshell + \
@ -81,7 +99,9 @@ in {
test \ test \
target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \
method=build \ method=build \
system={}".format(i)]) 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, addShell(f,name="build-{}".format(i),env=env_makefu,
@ -91,11 +111,17 @@ in {
test \ test \
target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \ target=$LOGNAME@${config.krebs.build.host.name}/tmp/testbuild/$LOGNAME \
method=build \ method=build \
system={}".format(i)]) system={}".format(i)
]
)
bu.append(util.BuilderConfig(name="build-all", bu.append(
util.BuilderConfig(
name="build-all",
workernames=workernames, workernames=workernames,
factory=f)) factory=f
)
)
''; '';