-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
30 lines (30 loc) · 789 Bytes
/
build.sh
File metadata and controls
30 lines (30 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
echo "setting up environment"
. ./setup-java.sh
echo "Running build for docker"
mvn clean install -Ddocker
if [ $? -eq 0 ]; then
echo "Build completed for docker"
echo "Spinup testable components"
docker-compose -f docker-compose.test.yml up &
echo "Checking webservice health"
siteUp=0;
while [ ${siteUp} -eq 0 ]
do
userServiceStatus=`curl -Is http://localhost:9002/health | head -n 1|grep 200`
authServiceStatus=`curl -Is http://localhost:9001/health | head -n 1|grep 200`
if [ "userServiceStatus"x != x ]
then
siteUp=1;
echo "Service is up"
else
siteUp=0;
echo "Service is not up yet"
sleep 5s
fi
done;
#echo "Running tests"
#mvn -f integration-tests/pom.xml clean install
kill %1
else
echo "Build failed"
fi