From af02ed995805aeb492548448714e844e5c8015bf Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 12 Mar 2023 15:04:59 +0000 Subject: [PATCH] nix/gitlab-ci: add retries for build --- nix/gitlab-ci/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/gitlab-ci/default.nix b/nix/gitlab-ci/default.nix index 7dc4b4023c..4130543eda 100644 --- a/nix/gitlab-ci/default.nix +++ b/nix/gitlab-ci/default.nix @@ -38,7 +38,7 @@ let image = "nixos/nix:latest"; needs = [{ job = "nixCache-linux-eval"; artifacts = true; }]; script = [ - "nix-store --realise $(cat drv-name) --option substituters \"https://cache.nixos.org/ s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\" --indirect --add-root ./result" + "for n in 1 2 3 4 5; do echo attempt $n; nix-store --realise $(cat drv-name) --option substituters \"https://cache.nixos.org/ s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\" --indirect --add-root ./result && break; done" "readlink -f ./result" "nix run -f ./ go.nix.bcacheup -c bcacheup --cache_url vaultgs://lukegb-nix-cache --vault_addr unix:///run/tokend/sock --vault_token_source gcp/roleset/binary-cache-deployer/token ./result" "cat ./result/combined-systems > systems.json"