add cleanup script for docker windows machine
parent
f95d43a2c7
commit
781e3ea105
|
@ -0,0 +1,20 @@
|
|||
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
|
|
@ -0,0 +1 @@
|
|||
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"
|
Loading…
Reference in New Issue