Skip to content

Commit 0dfac0b

Browse files
committed
ci: more logging in install-windows-updates
1 parent c6c4dab commit 0dfac0b

File tree

1 file changed

+7
-4
lines changed
  • ci/tasks/install-windows-updates

1 file changed

+7
-4
lines changed

ci/tasks/install-windows-updates/run.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,19 @@ function run_powershell_command_with_logging() {
6060
}
6161

6262
function wait_for_vm_to_come_up() {
63-
echo "Checking if VM is up" >&2
63+
echo "Starting VM check" >&2
64+
count=0
6465
result=-1
6566
while [[ result -ne 0 ]]; do
6667
set +e
68+
echo "Checking VM: ${count}" >&2
69+
count=$((count+1))
6770
start_powershell_command Get-ChildItem
6871
result=$?
6972
set -e
7073
sleep 5
7174
done
72-
echo "VM is up" >&2
75+
echo "Finished VM check" >&2
7376
}
7477

7578
function get_windows_updates_remaining() {
@@ -96,8 +99,8 @@ while [[ ${updates_remaining} -ne 0 ]]; do
9699

97100
wait_for_vm_to_come_up
98101

99-
updates_remaining=
100-
while [[ -z "${updates_remaining}" ]] ; do
102+
updates_remaining=""
103+
while [[ -z "${updates_remaining}" || "${updates_remaining}" == "null" ]] ; do
101104
set +e # ignore failures here since the vmware tools agent may be down while updates are being applied
102105
updates_remaining=$(get_windows_updates_remaining)
103106
set -e

0 commit comments

Comments
 (0)