diff options
author | Fernando J Pando <fernando.pando@stelligent.com> | 2017-01-30 12:44:14 -0500 |
---|---|---|
committer | Fernando J Pando <fernando.pando@stelligent.com> | 2017-02-07 11:14:42 -0500 |
commit | 34b5c9a4de92120d2c302e084f0139bc3cd8f155 (patch) | |
tree | 0c01e12d896f628fa46e9473847cab604524b08d /nixos/modules/services/continuous-integration/buildbot/master.nix | |
parent | 4853900dd3cf1908e92a6287a500368ed4752ef1 (diff) | |
download | nixlib-34b5c9a4de92120d2c302e084f0139bc3cd8f155.tar nixlib-34b5c9a4de92120d2c302e084f0139bc3cd8f155.tar.gz nixlib-34b5c9a4de92120d2c302e084f0139bc3cd8f155.tar.bz2 nixlib-34b5c9a4de92120d2c302e084f0139bc3cd8f155.tar.lz nixlib-34b5c9a4de92120d2c302e084f0139bc3cd8f155.tar.xz nixlib-34b5c9a4de92120d2c302e084f0139bc3cd8f155.tar.zst nixlib-34b5c9a4de92120d2c302e084f0139bc3cd8f155.zip |
buildbot: 0.9.0.post1 -> 0.9.3
- Fixes unneeded patching - Adds worker to build inputs now needed for tests - Replaces enableworker option with worker configuration module - Openssh required for tests - Fixes worker hardcoded paths - Tested on Nixos Unstable
Diffstat (limited to 'nixos/modules/services/continuous-integration/buildbot/master.nix')
-rw-r--r-- | nixos/modules/services/continuous-integration/buildbot/master.nix | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/nixos/modules/services/continuous-integration/buildbot/master.nix b/nixos/modules/services/continuous-integration/buildbot/master.nix index a40be4f546ea..512e09eb8041 100644 --- a/nixos/modules/services/continuous-integration/buildbot/master.nix +++ b/nixos/modules/services/continuous-integration/buildbot/master.nix @@ -7,7 +7,7 @@ with lib; let cfg = config.services.buildbot-master; escapeStr = s: escape ["'"] s; - masterCfg = pkgs.writeText "master.cfg" '' + masterCfg = if cfg.masterCfg == null then pkgs.writeText "master.cfg" '' from buildbot.plugins import * factory = util.BuildFactory() c = BuildmasterConfig = dict( @@ -27,9 +27,8 @@ let factory.addStep(step) ${cfg.extraConfig} - ''; - - configFile = if cfg.masterCfg == null then masterCfg else cfg.masterCfg; + '' + else pkgs.writeText "master.cfg" cfg.masterCfg; in { options = { @@ -67,15 +66,13 @@ in { }; masterCfg = mkOption { - type = with types; nullOr path; + type = types.str; description = '' - Optionally pass path to raw master.cfg file. + Optionally pass raw master.cfg file as string. Other options in this configuration will be ignored. ''; default = null; - example = literalExample '' - pkgs.writeText "master.cfg" "BuildmasterConfig = c = {}" - ''; + example = "BuildmasterConfig = c = {}"; }; schedulers = mkOption { @@ -99,9 +96,9 @@ in { type = types.listOf types.str; description = "List of Workers."; default = [ - "worker.Worker('default-worker', 'password')" + "worker.Worker('example-worker', 'pass')" ]; - example = [ "worker.LocalWorker('default-worker')" ]; + example = [ "worker.LocalWorker('example-worker')" ]; }; status = mkOption { @@ -209,7 +206,7 @@ in { users.extraUsers = optional (cfg.user == "buildbot") { name = "buildbot"; - description = "buildbot user"; + description = "Buildbot User."; isNormalUser = true; createHome = true; home = cfg.home; @@ -219,7 +216,7 @@ in { }; systemd.services.buildbot-master = { - description = "Buildbot Continuous Integration Server"; + description = "Buildbot Continuous Integration Server."; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; path = cfg.packages; @@ -233,9 +230,8 @@ in { }; preStart = '' - mkdir -vp ${cfg.buildbotDir} - chown -c ${cfg.user}:${cfg.group} ${cfg.buildbotDir} - ln -sf ${configFile} ${cfg.buildbotDir}/master.cfg + ${pkgs.coreutils}/bin/mkdir -vp ${cfg.buildbotDir} + ${pkgs.coreutils}/bin/ln -sfv ${masterCfg} ${cfg.buildbotDir}/master.cfg ${cfg.package}/bin/buildbot create-master ${cfg.buildbotDir} ''; @@ -247,4 +243,6 @@ in { }; }; + meta.maintainers = with lib.maintainers; [ nand0p Mic92 ]; + } |