File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -120,3 +120,4 @@ remove_summary_table_file
120
120
# Cleanup any old containers and images
121
121
cleanup_images
122
122
cleanup_manifest
123
+ clear_build_cache
Original file line number Diff line number Diff line change @@ -253,6 +253,19 @@ function cleanup_manifest() {
253
253
rm -rf ~ /.docker/manifests
254
254
}
255
255
256
+ function clear_build_cache() {
257
+ # Reduce the size of the build cache to avoid exhaustion of the space
258
+ docker system df
259
+ echo Pruning builder cache to 10Gb
260
+ # docker on our arm32 machines gives parse error if bigger than this
261
+ if [ " $( uname -m) " = " armv7l" ]; then
262
+ SPACE_TO_KEEP=2100000000
263
+ else
264
+ SPACE_TO_KEEP=10000000000
265
+ fi
266
+ docker builder prune -f --keep-storage ${SPACE_TO_KEEP}
267
+ }
268
+
256
269
# Check if a given docker image exists on the server.
257
270
# This script errors out if the image does not exist.
258
271
function check_image() {
You can’t perform that action at this time.
0 commit comments