diff --git a/ci/refresh-testnet.sh b/ci/refresh-testnet.sh index 5644c2a069e48e..bdaaae86907de7 100755 --- a/ci/refresh-testnet.sh +++ b/ci/refresh-testnet.sh @@ -29,29 +29,40 @@ while read -r vmName vmZone status; do vmlist+=("$vmName:$vmZone") done < <(gcloud compute instances list --filter="labels.testnet-mode=validator" --format 'value(name,zone,status)') + +echo "--- Refreshing" mode=leader+drone for info in "${vmlist[@]}"; do vmName=${info%:*} vmZone=${info#*:} + echo "Starting refresh for $vmName" - echo "--- Processing $vmName in zone $vmZone as $mode" - cat > autogen-refresh.sh < "autogen-refresh-$vmName.sh" < "log-$vmName.txt" 2>&1 & mode=validator done +echo "Waiting..." +wait + +for info in "${vmlist[@]}"; do + vmName=${info%:*} + cat "log-$vmName.txt" +done + echo "--- done" exit 0