buildbot: 0.9.3 -> 0.9.4

- adds jwt
- adds module tests
- master.cfg as path in module
- fix systemd worker config
- builds on darwin
- tested on nixos
This commit is contained in:
Fernando J Pando
2017-03-07 00:45:37 +01:00
committed by Franz Pletz
parent d102115101
commit 9f062c2c0b
6 changed files with 66 additions and 34 deletions
@@ -28,7 +28,7 @@ let
${cfg.extraConfig}
''
else pkgs.writeText "master.cfg" cfg.masterCfg;
else cfg.masterCfg;
in {
options = {
@@ -66,13 +66,10 @@ in {
};
masterCfg = mkOption {
type = types.nullOr types.str;
description = ''
Optionally pass raw master.cfg file as string.
Other options in this configuration will be ignored.
'';
type = types.nullOr types.path;
description = "Optionally pass master.cfg path. Other options in this configuration will be ignored.";
default = null;
example = "BuildmasterConfig = c = {}";
example = "/etc/nixos/buildbot/master.cfg";
};
schedulers = mkOption {
@@ -88,7 +85,7 @@ in {
type = types.listOf types.str;
description = "List of Builders.";
default = [
"util.BuilderConfig(name='runtests',workernames=['default-worker'],factory=factory)"
"util.BuilderConfig(name='runtests',workernames=['example-worker'],factory=factory)"
];
};
@@ -183,10 +180,7 @@ in {
package = mkOption {
type = types.package;
default = pkgs.buildbot-ui;
description = ''
Package to use for buildbot.
<literal>buildbot-full</literal> is required in order to use local workers.
'';
description = "Package to use for buildbot.";
example = pkgs.buildbot-full;
};
@@ -100,14 +100,11 @@ in {
systemd.services.buildbot-worker = {
description = "Buildbot Worker.";
after = [ "network.target" ];
after = [ "network.target" "buildbot-master.service" ];
wantedBy = [ "multi-user.target" ];
wants = [ "buildbot-master.service" ];
path = cfg.packages;
preStart = ''
# NOTE: ensure master has time to start in case running on localhost
${pkgs.coreutils}/bin/sleep 4
${pkgs.coreutils}/bin/mkdir -vp ${cfg.buildbotDir}
${cfg.package}/bin/buildbot-worker create-worker ${cfg.buildbotDir} ${cfg.masterUrl} ${cfg.workerUser} ${cfg.workerPass}
'';