jenkins-common.sh: exit early on full disk

When my disk runs full, jenkins-common.sh fails to create a VOL_BASEDIR right
at the start, and hence no testsuite gets its external volumes mounted
properly. However, the test suite still starts up with missing cfg files etc,
and fails in non-obvious ways, until I find out the disk is full some minutes
later. Instead, verify that the base dir really exists or bail out right there.

Change-Id: I6540797c8e0ee3e7b09d4a80592d5e270e7d9adc
This commit is contained in:
Neels Hofmeyr 2020-07-29 01:34:34 +02:00 committed by laforge
parent 27a063fc2f
commit 596aa901ce
1 changed files with 5 additions and 0 deletions

View File

@ -135,6 +135,11 @@ else
mkdir -p "$VOL_BASE_DIR"
fi
if [ ! -d "$VOL_BASE_DIR" ]; then
echo "ERROR: \$VOL_BASE_DIR does not exist: '$VOL_BASE_DIR'"
exit 1
fi
# non-jenkins execution: put logs in /tmp
if [ "x$BUILD_TAG" = "x" ]; then
BUILD_TAG=nonjenkins