Add retry warnings the the devops output

This commit is contained in:
Matthew Leibowitz 2019-05-24 17:11:47 +02:00
Родитель 3968aaf97c
Коммит df031f291d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 3650EBE4AA155AF9
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -17,9 +17,9 @@ Process {
} catch {
$Attempt = $Attempt + 1
if ($Attempt -lt $RetryCount) {
Write-Host "[$Attempt of $RetryCount] Script failed to execute, retrying..."
Write-Host "##vso[task.logissue type=warning] ($Attempt of $RetryCount) Script failed to execute, retrying..."
} else {
Write-Host "[$Attempt of $RetryCount] Script failed to execute."
Write-Host "##vso[task.logissue type=warning] ($Attempt of $RetryCount) Script failed to execute."
exit 1
}
}

Просмотреть файл

@ -8,9 +8,9 @@ function retry()
"$@" && break || {
((Attempt++))
if [[ $Attempt -lt $RetryCount ]]; then
echo "[$Attempt of $RetryCount] Script failed to execute, retrying..."
echo "##vso[task.logissue type=warning] ($Attempt of $RetryCount) Script failed to execute, retrying..."
else
echo "[$Attempt of $RetryCount] Script failed to execute.">&2
echo "##vso[task.logissue type=warning] ($Attempt of $RetryCount) Script failed to execute.">&2
exit 1
fi
}