File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packer/conf/docker/cron.hourly Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ mark_instance_unhealthy() {
12
12
killall -QUIT buildkite-agent || true
13
13
14
14
# mark the instance for termination
15
+ echo " Marking instance as unhealthy"
15
16
aws autoscaling set-instance-health \
16
17
--instance-id " $( curl http://169.254.169.254/latest/meta-data/instance-id) " \
17
18
--health-status Unhealthy
@@ -20,11 +21,13 @@ mark_instance_unhealthy() {
20
21
trap mark_instance_unhealthy ERR
21
22
22
23
# # -----------------------------------------------------------------
23
- # # Check disk, we only want to prune images/containers if we have to
24
+ # # Check disk, we only want to prune images/containers/build caches
25
+ # # if we really need to
24
26
25
27
if ! /usr/local/bin/bk-check-disk-space.sh ; then
26
28
echo " Cleaning up docker resources older than ${DOCKER_PRUNE_UNTIL} "
27
29
docker image prune --all --force --filter " until=${DOCKER_PRUNE_UNTIL} "
30
+ docker builder prune --all --force --filter " until=${DOCKER_PRUNE_UNTIL} "
28
31
29
32
if ! /usr/local/bin/bk-check-disk-space.sh ; then
30
33
echo " Disk health checks failed" >&2
You can’t perform that action at this time.
0 commit comments