ci: persist NuGet restore cache across Linux builds [CI]
This commit is contained in:
1 parent
f2af7950e7
commit
59c98e6d7b
6 files changed
+34
-25
No files matched your search
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Caller holds its store lock. Keep recent image layers and persistent RUN caches.
|
||||
# Caller holds its store lock. Keep recent image layers and the host NuGet cache.
|
||||
set -euo pipefail
|
||||
: "${CONTAINERS_STORAGE_CONF:?an explicit, locked CI Buildah store is required}"
|
||||
# No build is active while the caller holds the exclusive store lock. Remove
|
||||
# working containers left by canceled builds before considering old image layers.
|
||||
buildah unshare buildah rm --all >/dev/null 2>&1 || true
|
||||
buildah rmi localhost/moshiro-agent-binaries:linux-musl-x64 >/dev/null 2>&1 || true
|
||||
# prune also deletes RUN cache mounts; remove only expired intermediate layers and versioned application images.
|
||||
# Remove only expired intermediate layers and versioned application images.
|
||||
mapfile -t expired < <(buildah images --all --no-trunc --format '{{.ID}} {{.Created}} {{.Name}}:{{.Tag}}' | python3 -c '
|
||||
import re,sys,time
|
||||
cutoff=time.time()-7*86400
|
||||
|
||||
Reference in new issue
Block a user