From f4588aff2bc0765d436c43a8c25890e1f4879950 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Mon, 16 Dec 2024 00:25:26 +0100 Subject: [PATCH] feat: listen on Gerrit events and rewrite them as generic VCS events This introduces the private SSH key for Gerrit event streaming. Signed-off-by: Raito Bezarius --- flake.lock | 8 +++--- hosts/bagel-box/default.nix | 12 +++++++-- secrets.nix | 1 + .../floral/gerrit-event-listener-ssh-key.age | Bin 0 -> 1417 bytes services/ofborg/default.nix | 24 ++++++++++++++---- 5 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 secrets/floral/gerrit-event-listener-ssh-key.age diff --git a/flake.lock b/flake.lock index 5a29de4..7dc5874 100644 --- a/flake.lock +++ b/flake.lock @@ -749,11 +749,11 @@ "ofborg": { "flake": false, "locked": { - "lastModified": 1734205511, - "narHash": "sha256-yyQ05iZ5OsSM68JAqFmLHcrvtQfKQfl5iKHEMUvC+wI=", + "lastModified": 1734308727, + "narHash": "sha256-/bJhMZQ5VSblvgqAR9hSLwdm5pxenn/UMY8pDDVSquI=", "ref": "refs/heads/vcs-generalization", - "rev": "3af7e6976b995037132f971c6af78e00096ca9dd", - "revCount": 1487, + "rev": "7bcc8fa584c66f317923337658974c0525e5779f", + "revCount": 1495, "type": "git", "url": "https://git.lix.systems/the-distro/ofborg.git" }, diff --git a/hosts/bagel-box/default.nix b/hosts/bagel-box/default.nix index c0445dc..a7abf5f 100644 --- a/hosts/bagel-box/default.nix +++ b/hosts/bagel-box/default.nix @@ -39,9 +39,17 @@ postgres.enable = true; ofborg = { rabbitmq.enable = true; - mass-rebuilder.enable = true; pastebin.enable = true; - builder.enable = true; + # TODO: statcheck.enable = true; + + mass-rebuilder.enable = true; + # TODO: enable once ready. + builder.enable = false; + + gerrit-event-streamer.enable = true; + gerrit-generic-vcs-filter.enable = true; + + # FIXME: plug into our prometheus stack. stats.enable = true; }; }; diff --git a/secrets.nix b/secrets.nix index bbeb35b..7136b6c 100644 --- a/secrets.nix +++ b/secrets.nix @@ -47,6 +47,7 @@ let postgres-ca-priv = [ machines.bagel-box ]; postgres-tls-priv = [ machines.bagel-box ]; rabbitmq-password = [ machines.bagel-box ]; + gerrit-event-listener-ssh-key = [ machines.bagel-box ]; newsletter-secrets = [ machines.public01 ]; s3-revproxy-api-keys = [ machines.public01 ]; diff --git a/secrets/floral/gerrit-event-listener-ssh-key.age b/secrets/floral/gerrit-event-listener-ssh-key.age new file mode 100644 index 0000000000000000000000000000000000000000..efd403a3e34b56028072c2092c74c8bb1562c158 GIT binary patch literal 1417 zcmZY7`;XHE0KjqhLE(mS7|`HhaKMR3*{zSgDhjlFcJH?9w$_Mt-MX#av)lR@8X}R1 zBxnM{MIjz%!Xa-I)F3|K!b?d6z2pdR7(6hdo~T5`6MoQN_(lJMPx8%|&*v<;il7*^ zX0cl7sVaG^3YjcR%#B9DlFPz&JA|5n0OJucb5W8AJ`ejyM@p`{i(E=}B*}2B3Zap- zwcTQ^44v}YG_EBPrgSR-xY&FpPA5}T3llV+OMywkPvb41uKRIAX|qMFR%}#k|I_Np zRwZw?^O;=Jnu`bA4Ofmxg`7kV*L0lprXzJlb$SUXR1zF%&Y(pQHBwAM zhf_^E$?HU{6$=RIb|F+O(2z!RD3X(W)i@t9Ja!#$_!Ya|gjyA;T~fk&y6siGP|+#+ z8IH$2(J19*LA#ZpP_7k+>u#GZf+^vcU#g-7Nzy~UT!E*mRue8}lQE`PXf!B?1lJrm zpM&D5U={_7lp`F5qSa#78xreW#BOazrG$zRft;TT3Ux*X#CF}3VbY2xZ3jRe{kLMu zP?dxSAn(?`dy-YvNP#pLn_QWQQ86FrBT`08gcG1%Y~)cmfvdQu0+X6YpnXn}ry{0s zs(=7dI1Zq^zYG)*&O>JWwQAB&0(QBYV8o^$B1$qRXW9R1AcZ>Pn3>c>k3+E(6KRnyKaz(g9X$S6VpfsX!#F#Y6d8Np+R9rrT4b z8EaJM8cDm)M*LR`AsHu*nX?8GLYjoHBs6tcplm9iEkTqoD|-_fPHTt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