Add flag validation diskspace and set false(skip) step by default (#909)

* flag validation diskspace

* display Available disk space

* update image.CI

* add image.CI flag

* update env RUN_VALIDATION_FLAG
This commit is contained in:
Aleksandr Chebotov
2020-05-21 09:08:52 +03:00
committed by GitHub
parent e25d793c29
commit 521b0c5e28
4 changed files with 15 additions and 0 deletions

View File

@@ -8,6 +8,12 @@ availableSpaceMB=$(df / -hm | sed 1d | awk '{ print $4}')
minimumFreeSpaceMB=17800
echo "Available disk space: $availableSpaceMB MB"
if [ $RUN_VALIDATION != "true" ]; then
echo "Skipping validation disk space..."
exit 0
fi
if [ $availableSpaceMB -le $minimumFreeSpaceMB ]; then
echo "Not enough disk space on the image (minimum available space: $minimumFreeSpaceMB MB)"
exit 1