未验证 提交 ce79bf25 编写于 作者: S Sharif Elgamal 提交者: GitHub

Merge pull request #10838 from sharifelgamal/prune-windows

add cleanup script for docker windows machines
function Jenkins {
Get-Process e2e-windows-amd64 2>$NULL
if ($?) {
return $TRUE
}
return $FALSE
}
if (Jenkins) {
exit 0
}
echo "waiting to see if any jobs are coming in..."
timeout 30
if (Jenkins) {
exit 0
}
echo "doing it"
docker system prune --all --force
Get-Process "*Docker Desktop*" | Stop-Process
shutdown /r
Schtasks /create /tn cleanup_reboot /sc HOURLY /tr "Powershell gsutil -m cp gs://minikube-builds/master/windows_cleanup_and_reboot_docker.ps1 C:\Users\jenkins; C:\Users\jenkins\windows_cleanup_and_reboot_docker.ps1"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册