scripts/deploy: deploy crappy latter than all the others

This commit is contained in:
2024-07-08 00:54:08 +00:00
parent 46bf7c5ac9
commit f8d0c9ce3b

View File

@@ -161,17 +161,36 @@ deployOneHost() {
fi fi
} }
parseArgs "$@"
failedDeploys=() failedDeploys=()
for v in "${variants[@]}"; do deployHosts() {
local hosts=("$@")
for v in "${variants[@]}"; do
for h in "${hosts[@]}"; do for h in "${hosts[@]}"; do
deployOneHost "$h" "$v" || \ deployOneHost "$h" "$v" || \
failedDeploys+=("$h$v") failedDeploys+=("$h$v")
done done
done
}
parseArgs "$@"
# i care e.g. that full moby is deployed before crappy:
earlyHosts=()
lateHosts=()
for host in "${hosts[@]}"; do
case $host in
(crappy)
lateHosts+=("$host")
;;
(*)
earlyHosts+=("$host")
;;
esac
done done
deployHosts "${earlyHosts[@]}"
deployHosts "${lateHosts[@]}"
if [ "${#failedDeploys[@]}" -ne 0 ]; then if [ "${#failedDeploys[@]}" -ne 0 ]; then
echo "FAILED DEPLOYMENT:" echo "FAILED DEPLOYMENT:"
for d in "${failedDeploys[@]}"; do for d in "${failedDeploys[@]}"; do