Add an explicit cache restore
This commit is contained in:
@@ -40,13 +40,7 @@ stages:
|
||||
${EXCEPT}
|
||||
sources
|
||||
before_script:
|
||||
- packer init sources
|
||||
- echo $COMMAND
|
||||
- mc alias set storage "http://localhost:9000" root "$MINIO_SECRET"
|
||||
- mc ls storage/isos/cache
|
||||
- file=$(echo var.iso.url | packer console -var-file="${distro}" -config-type=hcl2 sources/)
|
||||
- mkdir cache
|
||||
- mc get "storage/isos/$file" "$file"
|
||||
- nix run ".#cache-restore"
|
||||
script:
|
||||
- ls -l cache/
|
||||
- echo $COMMAND > build.sh
|
||||
|
||||
@@ -72,6 +72,7 @@ downloads:
|
||||
paths:
|
||||
- ./packer_config/
|
||||
script:
|
||||
- nix run ".#cache-restore"
|
||||
- nix run ".#cache"
|
||||
|
||||
trigger:
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
mc alias set storage "$STORAGE_URL" root "$MINIO_SECRET"
|
||||
|
||||
for f in $(mc ls --json storage/isos/cache | jq '.key' | tr -d '"'); do
|
||||
mc get -q "storage/isos/cache/$f" "./cache/$f"
|
||||
done
|
||||
Reference in New Issue
Block a user