mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
8a6cfacbff
We've recently seen a few cases where the macOS nodes ended up not having the cache partition mounted. So far this has only happened on semi-broken nodes (guest VM still up and running but host unable to connect to it), so I haven't been able to actually poke at a broken machine, but I believe this should allow a machine in such a state to recover. While we haven't observed a similar issue on Linux nodes (as far as I'm aware), I have made similar changes there to keep both scripts in sync. CHANGELOG_BEGIN CHANGELOG_END
21 lines
613 B
YAML
21 lines
613 B
YAML
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
steps:
|
|
- bash: |
|
|
set -euo pipefail
|
|
|
|
eval "$(dev-env/bin/dade-assist)"
|
|
|
|
exec 1> >(while IFS= read -r line; do echo "$(date -uIs) [out]: $line"; done)
|
|
exec 2> >(while IFS= read -r line; do echo "$(date -uIs) [err]: $line"; done >&2)
|
|
|
|
df -h .
|
|
if [ $(df -m . | sed 1d | awk '{print $4}') -lt 50000 ]; then
|
|
echo "Disk full, cleaning up..."
|
|
$HOME/reset_caches.sh
|
|
echo "Done."
|
|
df -h .
|
|
fi
|
|
displayName: clean-up disk cache
|