-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathci-test-bin-vnc.sh
46 lines (45 loc) · 1019 Bytes
/
ci-test-bin-vnc.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
CONTAINER_NAME=`date +%s`
mkdir temp && chmod -Rf 777 temp
cd temp
docker run --rm -d --name "${CONTAINER_NAME}" -p 9080:9080 -p 6080:80 -p 5900:5900 -v `pwd`/sample:/workdir -i sumeetchhetri/gatf-bin-vnc
echo "Waiting for gatf to listen on port 9080..."
COUNTER=0
while ! nc -z localhost 9080; do
sleep 1
COUNTER=$((COUNTER+1))
if [ "$COUNTER" = 60 ]
then
echo "exiting...."
exit
fi
done
echo "gatf listening on port 9080..."
echo "Waiting for vnc-web to listen on port 6080..."
COUNTER=0
while ! nc -z localhost 6080; do
sleep 1
COUNTER=$((COUNTER+1))
if [ "$COUNTER" = 60 ]
then
echo "exiting...."
exit
fi
done
echo "gatf listening on port 6080..."
echo "Waiting for vnc to listen on port 5900..."
COUNTER=0
while ! nc -z localhost 5900; do
sleep 1
COUNTER=$((COUNTER+1))
if [ "$COUNTER" = 60 ]
then
echo "exiting...."
exit
fi
done
echo "gatf listening on port 5900..."
docker logs ${CONTAINER_NAME}
docker kill ${CONTAINER_NAME}
cd -
rm -rf temp