Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] fix linux runners running out of disk space (fixed #6635) #6636

Merged
merged 18 commits into from
Sep 2, 2024
Merged
29 changes: 29 additions & 0 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,35 @@ resources:
tasks: true
jobs:
###########################################
- job: Maintenance
borchero marked this conversation as resolved.
Show resolved Hide resolved
###########################################
pool: mariner-20240410-0
container: ubuntu-latest
# routine maintenance (like periodically deleting old files),
# to be run on 1 random CI runner in the self-hosted pool each runner
steps:
- script: |
print-diagnostics(){
echo "---- df -h -m ----"
df -h -m
echo "---- docker system df ----"
/tmp/docker system df
echo "---- docker images ----"
/tmp/docker images
}
# check disk usage
print-diagnostics
# remove old containers, container images, volumes
# ref: https://stackoverflow.com/a/32723127/3986677)
echo "---- running 'docker system prune' ----"
/tmp/docker system prune \
--all \
--force \
--filter until=720h
# check disk usage again
print-diagnostics
displayName: clean
###########################################
- job: Linux
###########################################
variables:
Expand Down
Loading