Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Prevent pushing broken images

Michal Rutkac41e3df4c0d6
diff --git a/hooks/post_build b/hooks/post_build
index ce42a7edd..cfeae41bd 100644
--- a/hooks/post_build
+++ b/hooks/post_build
@@ -2,7 +2,7 @@
echo "===> Building OpenRemote source"
docker run -v $(pwd):/openremote \
$IMAGE_NAME \
- /bin/sh -c "./gradlew --console plain clean installDist"
+ /bin/sh -c "./gradlew --console plain clean installDist" || exit 1
echo "===> Building OpenRemote images"
docker run \
@@ -10,8 +10,7 @@ docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
--env DATE_TAG=$CACHE_TAG \
$IMAGE_NAME \
- /bin/sh -c "docker-compose -f profile/deploy.yml build --build-arg GIT_COMMIT=$SOURCE_COMMIT"
-
+ /bin/sh -c "docker-compose -f profile/deploy.yml build --build-arg GIT_COMMIT=$SOURCE_COMMIT" || exit 1
echo "===> Pushing OpenRemote images"
docker push openremote/deployment:${CACHE_TAG:-latest}