Skip to content

Commit

Permalink
Fix buildscripts to wait for Docker and build snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaars committed Aug 8, 2018
1 parent 1252e3d commit bca8b3c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions scripts/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ if [[ "${SUCCESS}" -eq 00 ]] ; then
fi


#mvn clean install
#if [[ "$?" -ne 0 ]] ; then
# exit y$?
#fi
mvn clean install
if [[ "$?" -ne 0 ]] ; then
exit y$?
fi

cd -
sh build_docker.sh
if [[ "$?" -ne 0 ]] ; then
exit y$?
fi

echo "Do you want to run docker-compose?"
while true; do
read -p "Do you want to run docker-compose?" yn
case ${yn} in
[Yy]* ) sh clean-run-docker-compose.sh; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
done
4 changes: 2 additions & 2 deletions scripts/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
WEBGOAT_HOME=$(pwd)/../

cd ${WEBGOAT_HOME}/webgoat-server
docker build -t webgoat/webgoat-8.0 .
docker build -t webgoat/webgoat-v8.0.0.snapshot .

cd ${WEBGOAT_HOME}/webwolf
docker build -t webgoat/webwolf .
docker build -t webgoat/webwolf-v8.0.0.snapshot .

2 changes: 1 addition & 1 deletion scripts/clean-run-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

cd ..
docker-compose rm -f
docker-compose up
docker-compose -f docker-compose-local.yml up

0 comments on commit bca8b3c

Please sign in to comment.