From 56a18672700c001265ccbb41b392e6eb58b279cc Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Tue, 2 Jan 2024 21:17:25 +0000 Subject: [PATCH] Update test.sh --- test.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index cf03796c..beb610a0 100644 --- a/test.sh +++ b/test.sh @@ -69,7 +69,12 @@ main() { SECONDS=0 export DOCKER_ENABLE_SECURITY=false - ./gradlew clean build + # Run the gradlew build command and check if it fails + if ! ./gradlew clean build; then + echo "Gradle build failed with security disabled, exiting script." + exit 1 + fi + # Building Docker images docker build --build-arg VERSION_TAG=alpha -t frooodle/s-pdf:latest -f ./Dockerfile . @@ -82,7 +87,12 @@ main() { run_tests "Stirling-PDF" "./exampleYmlFiles/docker-compose-latest.yml" export DOCKER_ENABLE_SECURITY=true - ./gradlew clean build + # Run the gradlew build command and check if it fails + if ! ./gradlew clean build; then + echo "Gradle build failed with security enabled, exiting script." + exit 1 + fi + # Building Docker images with security enabled docker build --build-arg VERSION_TAG=alpha -t frooodle/s-pdf:latest -f ./Dockerfile .