File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,35 @@ resources:
50
50
tasks : true
51
51
jobs :
52
52
# ##########################################
53
+ - job : Maintenance
54
+ # ##########################################
55
+ pool : mariner-20240410-0
56
+ container : ubuntu-latest
57
+ # routine maintenance (like periodically deleting old files),
58
+ # to be run on 1 random CI runner in the self-hosted pool each runner
59
+ steps :
60
+ - script : |
61
+ print-diagnostics(){
62
+ echo "---- df -h -m ----"
63
+ df -h -m
64
+ echo "---- docker system df ----"
65
+ /tmp/docker system df
66
+ echo "---- docker images ----"
67
+ /tmp/docker images
68
+ }
69
+ # check disk usage
70
+ print-diagnostics
71
+ # remove old containers, container images, volumes
72
+ # ref: https://stackoverflow.com/a/32723127/3986677)
73
+ echo "---- running 'docker system prune' ----"
74
+ /tmp/docker system prune \
75
+ --all \
76
+ --force \
77
+ --filter until=720h
78
+ # check disk usage again
79
+ print-diagnostics
80
+ displayName: clean
81
+ # ##########################################
53
82
- job : Linux
54
83
# ##########################################
55
84
variables :
You can’t perform that action at this time.
0 commit comments