caching round 2
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-10-15 22:56:33 +11:00
parent 8dcb6e253d
commit 3f994e88cf
2 changed files with 33 additions and 60 deletions

View File

@@ -1,21 +1,15 @@
local CacheVolume = "cache";
local Cache(name, settings) = {
name: name,
image: "meltwater/drone-cache",
pull: true,
settings: {
backend: "filesystem",
cache_key: "{{ .Repo.Name }}",
archive_format: "gzip",
mount: [
"/nix/store"
]
} + settings,
volumes: [
{
name: "cache",
path: "/tmp/cache"
}
]
image: "drillster/drone-volume-cache",
volumes: [ {
name: CacheVolume,
path: "/cache"
} ],
settings: settings + {
mount: ["/nix/store"]
}
};
local Pipeline(channel) = {
@@ -30,12 +24,12 @@ local Pipeline(channel) = {
CACHIX_CACHE: "xeals",
CACHIX_SIGNING_KEY: { from_secret: "cachix_key" },
},
volumes: [
{
name: "cache",
temp: {}
volumes: [ {
name: CacheVolume,
host: {
path: "/tmp/drone/cache"
}
],
} ],
steps: [
Cache("restore-nix-store", {
restore: true