From b2ed2ccacc6d0a890c97165cd11aa2390b07d393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 29 Apr 2024 13:27:35 +0200 Subject: [PATCH] master: add workaround if github is not present during boot --- README.md | 11 +++++++---- nix/master.nix | 5 +++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index db5ed9e..df854a0 100644 --- a/README.md +++ b/README.md @@ -65,17 +65,20 @@ To integrate with GitHub: ### Binary caches -To access the build results on other machines there are two options at the moment +To access the build results on other machines there are two options at the +moment #### Local binary cache (harmonia) -You can set up a binary cache on your buildbot-worker machine to make its nix store -accessible from other machines. Check out the README of the [project](https://github.com/nix-community/harmonia/?tab=readme-ov-file#configuration-for-public-binary-cache-on-nixos), +You can set up a binary cache on your buildbot-worker machine to make its nix +store accessible from other machines. Check out the README of the +[project](https://github.com/nix-community/harmonia/?tab=readme-ov-file#configuration-for-public-binary-cache-on-nixos), for an example configuration #### Cachix -Buildbot-nix also supports pushing packages to cachix. Check out the comment out [example configuration](https://github.com/Mic92/buildbot-nix/blob/main/examples/master.nix) +Buildbot-nix also supports pushing packages to cachix. Check out the comment out +[example configuration](https://github.com/Mic92/buildbot-nix/blob/main/examples/master.nix) in our repository. ### Real-World Deployments diff --git a/nix/master.nix b/nix/master.nix index d461208..32bfea1 100644 --- a/nix/master.nix +++ b/nix/master.nix @@ -206,6 +206,11 @@ in "cachix-signing-key:${builtins.toString cfg.cachix.signingKeyFile}" ++ lib.optional (cfg.cachix.authTokenFile != null) "cachix-auth-token:${builtins.toString cfg.cachix.authTokenFile}"; + + # Needed because it tries to reach out to github on boot. + # FIXME: if github is not available, we shouldn't fail buildbot, instead it should just try later again in the background + Restart = "on-failure"; + RestartSec = "30s"; }; };