Merge pull request #14344 from spowelljr/fixCronScript

CI: Fix cron cleanup script
pull/14315/head
Steven Powell 2022-06-15 13:31:12 -07:00 committed by GitHub
commit 78e4b54fe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 6 deletions

View File

@ -130,7 +130,7 @@ jobs:
run: |
minikube_binaries/minikube-linux-arm64 delete --all --purge || true
docker kill $(docker ps -aq) || true
docker system prune --volumes --force || true
docker system prune -a --volumes -f || true
- name: Run Integration Test
continue-on-error: false

View File

@ -42,7 +42,7 @@ check_running_job
echo "cleanup docker..."
docker kill $(docker ps -aq) >/dev/null 2>&1 || true
docker system prune --volumes --force || true
docker system prune -a --volumes -f || true
echo "rebooting..."
sudo reboot

View File

@ -50,7 +50,7 @@ If ($lastexitcode -gt 0) {
$json = "{`"state`": `"failure`", `"description`": `"Jenkins: docker failed to start`", `"target_url`": `"https://storage.googleapis.com/$gcs_bucket/Hyper-V_Windows.txt`", `"context`": `"$env:JOB_NAME`"}"
Write-GithubStatus -JsonBody $json
docker system prune --all --force
docker system prune -a --volumes -f
Exit $lastexitcode
}

View File

@ -108,7 +108,7 @@ else
fi
# let's just clean all docker artifacts up
docker system prune --force --volumes || true
docker system prune -a --volumes -f || true
docker system df || true
echo ">> Starting at $(date)"

View File

@ -55,7 +55,7 @@ function cleanup() {
# clean docker left overs
echo -e "\ncleanup docker..."
docker kill $(docker ps -aq) >/dev/null 2>&1 || true
docker system prune --volumes --force || true
docker system prune -a --volumes -f || true
# clean KVM left overs
echo -e "\ncleanup kvm..."
@ -117,7 +117,8 @@ function cleanup() {
}
# Give 15m for Linux-specific cleanup
timeout 15m cleanup
export -f cleanup
timeout 15m bash -c cleanup
# disable localkube, kubelet
systemctl list-unit-files --state=enabled \