summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/buildbot-stockholm.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-09-10 17:32:31 +0200
committermakefu <github@syntax-fehler.de>2018-09-10 17:32:31 +0200
commit859f98583788a9324be0e8c52d36a6bb812273fe (patch)
tree81e1ce4bd2a4185221761165023434f8737fff06 /krebs/2configs/buildbot-stockholm.nix
parentb2a3bd38ea70307c8b136eba42de7cc882afd441 (diff)
parentf6e69c6ecb25fc96655ec1749747d9ccb7880365 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/2configs/buildbot-stockholm.nix')
-rw-r--r--krebs/2configs/buildbot-stockholm.nix44
1 files changed, 33 insertions, 11 deletions
diff --git a/krebs/2configs/buildbot-stockholm.nix b/krebs/2configs/buildbot-stockholm.nix
index 13d4c6729..0aa9288ec 100644
--- a/krebs/2configs/buildbot-stockholm.nix
+++ b/krebs/2configs/buildbot-stockholm.nix
@@ -4,11 +4,34 @@ let
hostname = config.networking.hostName;
+ sourceRepos = [
+ "http://cgit.enklave.r/stockholm"
+ "http://cgit.gum.r/stockholm"
+ "http://cgit.hotdog.r/stockholm"
+ "http://cgit.ni.r/stockholm"
+ "http://cgit.prism.r/stockholm"
+ ];
+
+ # usage: build USER HOST
+ # This executable is meant to be run with <stockholm> as working directory.
+ # USER is expected to be a subdirectory of the working directory.
build = pkgs.writeDash "build" ''
- set -eu
- export USER="$1"
- export SYSTEM="$2"
- $(nix-build $USER/krops.nix --no-out-link --argstr name "$SYSTEM" --argstr target "$HOME/stockholm-build" -A ci)
+ set -efu
+
+ user=$1
+ host=$2
+
+ result=$(nix-build \
+ --argstr name "$host" \
+ --argstr target "$HOME"/stockholm-build \
+ --attr test \
+ --no-build-output \
+ --no-out-link \
+ --show-trace \
+ "$user"/krops.nix \
+ )
+
+ exec "$result"
'';
@@ -31,17 +54,16 @@ in
slaves = {
testslave = "lasspass";
};
- change_source.stockholm = ''
- stockholm_repo = 'http://cgit.hotdog.r/stockholm'
+ change_source.stockholm = concatMapStrings (repo: ''
cs.append(
changes.GitPoller(
- stockholm_repo,
- workdir='stockholm-poller', branches=True,
+ "${repo}",
+ workdir='stockholm${elemAt(splitString "." repo) 1}', branches=True,
project='stockholm',
pollinterval=10
)
)
- '';
+ '') sourceRepos;
scheduler = {
auto-scheduler = ''
sched.append(
@@ -69,7 +91,7 @@ in
builder_pre = ''
# prepare grab_repo step for stockholm
grab_repo = steps.Git(
- repourl=stockholm_repo,
+ repourl=util.Property('repository', 'http://cgit.hotdog.r/stockholm'),
mode='full',
submodules=True,
)
@@ -176,6 +198,6 @@ in
masterhost = "localhost";
username = "testslave";
password = "lasspass";
- packages = with pkgs; [ gnumake jq nix populate ];
+ packages = with pkgs; [ gnumake jq nix populate gnutar lzma gzip ];
};
}