Try doing parallel downloads with curl

This commit is contained in:
Greg Hellings
2024-04-10 13:06:37 -05:00
parent b52e08d4bf
commit 46e2edc9d8
+5 -3
View File
@@ -73,13 +73,15 @@ downloads:
script: script:
- set -exo pipefail - set -exo pipefail
- packer init sources - packer init sources
- files=""
- |- - |-
for vars in $(find distros/ -name '*.pkrvars.hcl'); do for vars in $(find distros/ -name '*.pkrvars.hcl'); do
file=$(echo var.iso.url | packer console -var-file=${vars} -config-type=hcl2 sources/) file=$(echo var.iso.url | packer console -var-file=${vars} -config-type=hcl2 sources/)
pushd cache files="${file} ${files}"
curl -O "${file}"
popd
done done
pushd cache
curl --parallel -L -O "${files}"
popd
trigger: trigger:
stage: trigger stage: trigger