From 760aec7e0727e9bdd99ccde6e2b4c2b27e8a35e0 Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Wed, 8 May 2024 11:15:31 -0400 Subject: [PATCH] Make the webhook endpoint URL configurable In some CI setups, the URL to access the CI server differs from the URL that the (external) webhook endpoint listens on. This change introduces an option webhookBaseUrl that allows setting that URL independently from the buildbot installation URL. --- nix/master.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nix/master.nix b/nix/master.nix index c08ad2f..5eda0a7 100644 --- a/nix/master.nix +++ b/nix/master.nix @@ -181,6 +181,13 @@ in example = "buildbot.numtide.com"; }; + webhookBaseUrl = lib.mkOption { + type = lib.types.str; + description = "URL base for the webhook endpoint that will be registered for github or gitea repos."; + example = "https://buildbot-webhooks.numtide.com/"; + default = "${config.services.buildbot-master.buildbotUrl}"; + }; + outputsPath = lib.mkOption { type = lib.types.nullOr lib.types.path; description = "Path where we store the latest build store paths names for nix attributes as text files. This path will be exposed via nginx at \${domain}/nix-outputs"; @@ -272,7 +279,7 @@ in )" }, admins=${builtins.toJSON cfg.admins}, - url=${builtins.toJSON config.services.buildbot-master.buildbotUrl}, + url=${builtins.toJSON config.services.buildbot-nix.master.webhookBaseUrl}, nix_eval_max_memory_size=${builtins.toJSON cfg.evalMaxMemorySize}, nix_eval_worker_count=${ if cfg.evalWorkerCount == null then "None" else builtins.toString cfg.evalWorkerCount