nix/gitlab-ci: add retries for build

This commit is contained in:
Luke Granger-Brown 2023-03-12 15:04:59 +00:00
parent c70a1338b9
commit af02ed9958

View file

@ -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"