summary refs log tree commit diff
path: root/nixos/modules/services/continuous-integration/buildbot/worker.nix
diff options
context:
space:
mode:
authorFernando J Pando <fernando.pando@stelligent.com>2017-03-07 14:26:21 -0500
committerFernando J Pando <fernando.pando@stelligent.com>2017-04-21 10:32:36 -0400
commit4ac06ea6a13bf082791f1e3293528dc6c1b67841 (patch)
treef07a4401e9a129befd6e0e3b87bbeff8fda2f01d /nixos/modules/services/continuous-integration/buildbot/worker.nix
parent4c0098f1dc65bc664be941fb4290274eba703483 (diff)
downloadnixpkgs-4ac06ea6a13bf082791f1e3293528dc6c1b67841.tar
nixpkgs-4ac06ea6a13bf082791f1e3293528dc6c1b67841.tar.gz
nixpkgs-4ac06ea6a13bf082791f1e3293528dc6c1b67841.tar.bz2
nixpkgs-4ac06ea6a13bf082791f1e3293528dc6c1b67841.tar.lz
nixpkgs-4ac06ea6a13bf082791f1e3293528dc6c1b67841.tar.xz
nixpkgs-4ac06ea6a13bf082791f1e3293528dc6c1b67841.tar.zst
nixpkgs-4ac06ea6a13bf082791f1e3293528dc6c1b67841.zip
buildbot: 0.9.4 -> 0.9.5
- adds distro dependency
- buildbot nodaemon in service module
- fakerepo for module tests
- service module parameter fixup
- tested on nixos
- tested on darwin
Diffstat (limited to 'nixos/modules/services/continuous-integration/buildbot/worker.nix')
-rw-r--r--nixos/modules/services/continuous-integration/buildbot/worker.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/nixos/modules/services/continuous-integration/buildbot/worker.nix b/nixos/modules/services/continuous-integration/buildbot/worker.nix
index e4ee4dd861e..a97f571e89d 100644
--- a/nixos/modules/services/continuous-integration/buildbot/worker.nix
+++ b/nixos/modules/services/continuous-integration/buildbot/worker.nix
@@ -74,7 +74,7 @@ in {
       };
 
       packages = mkOption {
-        default = [ ];
+        default = with pkgs; [ python27Packages.twisted git ];
         example = literalExample "[ pkgs.git ]";
         type = types.listOf types.package;
         description = "Packages to add to PATH for the buildbot process.";
@@ -106,7 +106,8 @@ in {
       path = cfg.packages;
 
       preStart = ''
-        ${pkgs.coreutils}/bin/mkdir -vp ${cfg.buildbotDir}
+        mkdir -vp ${cfg.buildbotDir}
+        rm -fv $cfg.buildbotDir}/buildbot.tac
         ${cfg.package}/bin/buildbot-worker create-worker ${cfg.buildbotDir} ${cfg.masterUrl} ${cfg.workerUser} ${cfg.workerPass}
       '';
 
@@ -115,7 +116,11 @@ in {
         User = cfg.user;
         Group = cfg.group;
         WorkingDirectory = cfg.home;
-        ExecStart = "${cfg.package}/bin/buildbot-worker start --nodaemon ${cfg.buildbotDir}";
+        Environment = "PYTHONPATH=${cfg.package}/lib/python2.7/site-packages:${pkgs.python27Packages.future}/lib/python2.7/site-packages";
+
+        # NOTE: call twistd directly with stdout logging for systemd
+        #ExecStart = "${cfg.package}/bin/buildbot-worker start --nodaemon ${cfg.buildbotDir}";
+        ExecStart = "${pkgs.python27Packages.twisted}/bin/twistd -n -l - -y ${cfg.buildbotDir}/buildbot.tac";
       };
 
     };