diff options
author | Lassulus <github@lassul.us> | 2023-09-09 19:09:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-09 19:09:06 +0200 |
commit | 72160fbdc1b0b610476d94c3368753f0da76bf5c (patch) | |
tree | 9926e477ebb40159875452d46ff4c1990ca71b1b | |
parent | 217407ff80823443c43db637dcd41461b913bd3b (diff) | |
parent | df4236c9043c2f7ee02847f8f1cccc0875d4ec6f (diff) |
Merge pull request #251302 from Mic92/buildbot
nixos/buildbot: support reload, buildbot-www-react: init 3.9
3 files changed, 45 insertions, 2 deletions
diff --git a/nixos/modules/services/continuous-integration/buildbot/master.nix b/nixos/modules/services/continuous-integration/buildbot/master.nix index 595374ea1e5b3..b4b997201c8f5 100644 --- a/nixos/modules/services/continuous-integration/buildbot/master.nix +++ b/nixos/modules/services/continuous-integration/buildbot/master.nix @@ -272,7 +272,13 @@ in { Group = cfg.group; WorkingDirectory = cfg.home; # NOTE: call twistd directly with stdout logging for systemd - ExecStart = "${python.pkgs.twisted}/bin/twistd -o --nodaemon --pidfile= --logfile - --python ${tacFile}"; + ExecStart = "${python.pkgs.twisted}/bin/twistd -o --nodaemon --pidfile= --logfile - --python ${cfg.buildbotDir}/buildbot.tac"; + # To reload on upgrade, set the following in your configuration: + # systemd.services.buildbot-master.reloadIfChanged = true; + ExecReload = [ + "${pkgs.coreutils}/bin/ln -sf ${tacFile} ${cfg.buildbotDir}/buildbot.tac" + "${pkgs.coreutils}/bin/kill -HUP $MAINPID" + ]; }; }; }; diff --git a/pkgs/development/tools/continuous-integration/buildbot/plugins.nix b/pkgs/development/tools/continuous-integration/buildbot/plugins.nix index 7cc6136b53fb3..429c19ecfceeb 100644 --- a/pkgs/development/tools/continuous-integration/buildbot/plugins.nix +++ b/pkgs/development/tools/continuous-integration/buildbot/plugins.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, callPackage, mock, cairosvg, klein, jinja2, buildbot-pkg }: +{ lib, buildPythonPackage, fetchPypi, fetchurl, callPackage, mock, cairosvg, klein, jinja2, buildbot-pkg, unzip, zip }: { # this is exposed for potential plugins to use and for nix-update inherit buildbot-pkg; @@ -29,6 +29,42 @@ }; }; + www-react = buildPythonPackage rec { + pname = "buildbot-www-react"; + inherit (buildbot-pkg) version; + format = "wheel"; + + # fetchpypy returns a 404 for the wheel? + # normal source release doesn't have any assets + src = fetchurl { + url = "https://github.com/buildbot/buildbot/releases/download/v${version}/buildbot_www_react-${version}-py3-none-any.whl"; + hash = "sha256-pEzuMiDhGQtIWQm80lgKIcTjnS7Z8UJhH9plJup5O84="; + }; + + # Remove unneccessary circular dependency on buildbot + postPatch = '' + pushd dist + unzip buildbot_www_react-${version}-py3-none-any.whl + sed -i "s/Requires-Dist: buildbot//" buildbot_www_react-${version}.dist-info/METADATA + chmod -R u+w buildbot_www_react-${version}-py3-none-any.whl + zip -r buildbot_www_react-${version}-py3-none-any.whl buildbot_www_react-${version}.dist-info + popd + ''; + + buildInputs = [ buildbot-pkg ]; + nativeBuildInputs = [ unzip zip ]; + + # No tests + doCheck = false; + + meta = with lib; { + homepage = "https://buildbot.net/"; + description = "Buildbot UI (React)"; + maintainers = with maintainers; [ mic92 ]; + license = licenses.gpl2Only; + }; + }; + console-view = buildPythonPackage rec { pname = "buildbot-console-view"; inherit (buildbot-pkg) version; diff --git a/pkgs/development/tools/continuous-integration/buildbot/update.sh b/pkgs/development/tools/continuous-integration/buildbot/update.sh index a295993607a80..3bbbfc840e44c 100755 --- a/pkgs/development/tools/continuous-integration/buildbot/update.sh +++ b/pkgs/development/tools/continuous-integration/buildbot/update.sh @@ -6,6 +6,7 @@ nix-update buildbot nix-update --version=skip buildbot-worker nix-update --version=skip buildbot-plugins.buildbot-pkg nix-update --version=skip buildbot-plugins.www +nix-update --version=skip buildbot-plugins.www-react nix-update --version=skip buildbot-plugins.console-view nix-update --version=skip buildbot-plugins.waterfall-view nix-update --version=skip buildbot-plugins.grid-view |