aboutsummaryrefslogtreecommitdiff
path: root/node/build
diff options
context:
space:
mode:
Diffstat (limited to 'node/build')
-rwxr-xr-xnode/build10
1 files changed, 10 insertions, 0 deletions
diff --git a/node/build b/node/build
index c628de1..59f5c46 100755
--- a/node/build
+++ b/node/build
@@ -61,6 +61,16 @@ if [ -n "$BUILD_CONFIG_REPO" ]; then
source /var/run/build-tools/build-config
fi
+
+# Stopgap measure to cleanup environment on instances reused for different jobs
+mount | grep -E "^tmpfs on .+workspace/" | awk ' {print $3}' | xargs --no-run-if-empty -n1 umount
+
+umount build/out/target || true
+umount build/out || true
+umount build || true
+rm -rf build
+mkdir build
+
ramdisk_size=$(get_ramdisk_size $2)
if [ -z "$ramdisk_size" ]; then