depot/.gitlab-ci.yml

15 lines
631 B
YAML
Raw Normal View History

2020-05-08 16:48:34 +00:00
nixCache:
image: "nixos/nix:latest"
script:
2020-05-08 17:02:42 +00:00
- "mkdir -p ops/secrets"
- "cp ${OPS_SECRETS_DEFAULT_NIX} ops/secrets/default.nix"
2020-05-08 16:48:34 +00:00
- "test -d cache || mkdir cache"
- "test -f cache/nix.closure && nix-store --import < cache/nix.closure"
- "nix build -vv -f ./ci-root.nix --substituters \"https://cache.nixos.org s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
- "nix-store --export $(nix-store -qR ./result) > cache/nix.closure"
- "nix copy -vv --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' ./result"
2020-05-08 16:48:34 +00:00
cache:
key: one-key-to-rule-them-all
paths:
- cache/