Check for Docker in run_npm_test.sh
Lack of Docker can cause build failure To avoid it if Docker is not available test is not started, simply returns 0 It is hard to make Docker installation reliable especially for very old or very new distros
This commit is contained in:
@ -12,6 +12,21 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Prevent failures in case if Docker is not available
|
||||||
|
command -v docker
|
||||||
|
if [ $? != 0 ]
|
||||||
|
then
|
||||||
|
echo "Docker is not available, skipping the test"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
command -v docker-compose
|
||||||
|
if [ $? != 0 ]
|
||||||
|
then
|
||||||
|
echo "docker-compose is not available, skipping the test"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
srcdir=$1
|
srcdir=$1
|
||||||
testsrc=$2
|
testsrc=$2
|
||||||
testdir=$3
|
testdir=$3
|
||||||
|
|||||||
Reference in New Issue
Block a user