Skip to content

Commit 760aec7

Browse files
antifuchsmergify[bot]
authored andcommitted
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.
1 parent e9a3849 commit 760aec7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

nix/master.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ in
181181
example = "buildbot.numtide.com";
182182
};
183183

184+
webhookBaseUrl = lib.mkOption {
185+
type = lib.types.str;
186+
description = "URL base for the webhook endpoint that will be registered for github or gitea repos.";
187+
example = "https://buildbot-webhooks.numtide.com/";
188+
default = "${config.services.buildbot-master.buildbotUrl}";
189+
};
190+
184191
outputsPath = lib.mkOption {
185192
type = lib.types.nullOr lib.types.path;
186193
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
272279
)"
273280
},
274281
admins=${builtins.toJSON cfg.admins},
275-
url=${builtins.toJSON config.services.buildbot-master.buildbotUrl},
282+
url=${builtins.toJSON config.services.buildbot-nix.master.webhookBaseUrl},
276283
nix_eval_max_memory_size=${builtins.toJSON cfg.evalMaxMemorySize},
277284
nix_eval_worker_count=${
278285
if cfg.evalWorkerCount == null then "None" else builtins.toString cfg.evalWorkerCount

0 commit comments

Comments
 (0)