nix/gitlab-ci: attempt to hack around us wanting to read the nix store DB
This commit is contained in:
parent
b5082319de
commit
9d16934db3
2 changed files with 4 additions and 2 deletions
|
@ -31,6 +31,7 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
blobURLFlag = flag.String("cache_url", "", "Cache URL")
|
blobURLFlag = flag.String("cache_url", "", "Cache URL")
|
||||||
|
storeDBFlag = flag.String("nix_store_db", nixstore.DefaultStoreDB, "Path to the nix store database")
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -419,7 +420,7 @@ func main() {
|
||||||
}
|
}
|
||||||
defer bucket.Close()
|
defer bucket.Close()
|
||||||
|
|
||||||
store, err := nixstore.Open(nixstore.DefaultStoreDB)
|
store, err := nixstore.Open(*storeDBFlag)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("opening Nix store: %v", err)
|
log.Fatalf("opening Nix store: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,8 @@ let
|
||||||
script = [
|
script = [
|
||||||
"nix run -f ./ third_party.nixpkgs.bash -c ./hack/populate_secrets.sh"
|
"nix run -f ./ third_party.nixpkgs.bash -c ./hack/populate_secrets.sh"
|
||||||
"nix build -v -f ./ci-root.nix --substituters \"https://cache.nixos.org/ s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
|
"nix build -v -f ./ci-root.nix --substituters \"https://cache.nixos.org/ s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
|
||||||
"GOOGLE_APPLICATION_CREDENTIALS=$HOME/sa.json nix run -f ./ go.nix.bcacheup -c bcacheup --cache_url gs://lukegb-nix-cache ./result"
|
"cp /nix/var/nix/db/db.sqlite db.sqlite"
|
||||||
|
"GOOGLE_APPLICATION_CREDENTIALS=$HOME/sa.json nix run -f ./ go.nix.bcacheup -c bcacheup --cache_url gs://lukegb-nix-cache --nix_store_db ./db.sqlite ./result"
|
||||||
"cat ./result/other-systemPathJSON > systems.json"
|
"cat ./result/other-systemPathJSON > systems.json"
|
||||||
];
|
];
|
||||||
artifacts = {
|
artifacts = {
|
||||||
|
|
Loading…
Reference in a new issue