Skip to content

Commit faabcd1

Browse files
authored
Update deploy.sh
Echo strings updated with formal language.
1 parent 92bae1e commit faabcd1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

deploy.sh

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22
if [[ "$TRAVIS_BRANCH" = "develop" || "$TRAVIS_BRANCH" = "master" ]];then
33
stestlogname="`date +%Y%m%d%H%M%S`_stest.log"
4-
echo "try to test stest_server network"
4+
echo "Trying to connect to stest_server network"
55
timeout 10 ping -c 5 47.93.42.145 > /dev/null || exit 1
66
timeout 10 ping -c 5 47.93.18.60 > /dev/null || exit 1
7-
echo "stest_server network good"
7+
echo "Successfully connected to stest_server network"
88
stest_server=""
99
docker_num_in_145=`ssh -p 22008 -t java-tron@47.93.42.145 'docker ps -a | wc -l'`
1010
docker_num_in_145=`echo $docker_num_in_145 | tr -d "\r"`
@@ -28,22 +28,22 @@ if [[ "$TRAVIS_BRANCH" = "develop" || "$TRAVIS_BRANCH" = "master" ]];then
2828

2929
if [ "$stest_server" = "" ]
3030
then
31-
echo "All docker server is busy, stest FAILED"
31+
echo "All docker servers are busy, stest FAILED"
3232
exit 1
3333
fi
3434

3535
change_branch_CMD="sed -i '1c branch_name_in_CI=$TRAVIS_BRANCH' /data/workspace/docker_workspace/do_stest.sh"
3636

37-
echo "Init the docker stest env"
38-
echo "'$stest_server' is stest server this time"
37+
echo "Initialize the docker stest env"
38+
echo "'$stest_server' is selected as stest server in this instance"
3939
ssh java-tron@$stest_server -p 22008 $change_branch_CMD
4040
`ssh java-tron@$stest_server -p 22008 sh /data/workspace/docker_workspace/do_stest.sh >$stestlogname 2>&1` &
4141
sleep 300 && echo $TRAVIS_BRANCH &
4242
wait
4343
if [[ `find $stestlogname -type f | xargs grep "Connection refused"` =~ "Connection refused" || `find $stestlogname -type f | xargs grep "stest FAILED"` =~ "stest FAILED" ]];
4444
then
4545
rm -f $stestlogname
46-
echo "first Retry stest task"
46+
echo "Retrying stest task for the first time"
4747
ssh java-tron@$stest_server -p 22008 $change_branch_CMD
4848
`ssh java-tron@$stest_server -p 22008 sh /data/workspace/docker_workspace/do_stest.sh >$stestlogname 2>&1` &
4949
sleep 300 && echo $TRAVIS_BRANCH &
@@ -52,13 +52,13 @@ if [[ "$TRAVIS_BRANCH" = "develop" || "$TRAVIS_BRANCH" = "master" ]];then
5252
if [[ `find $stestlogname -type f | xargs grep "Connection refused"` =~ "Connection refused" || `find $stestlogname -type f | xargs grep "stest FAILED"` =~ "stest FAILED" ]];
5353
then
5454
rm -f $stestlogname
55-
echo "second Retry stest task"
55+
echo "Retrying stest task for the second time"
5656
ssh java-tron@$stest_server -p 22008 $change_branch_CMD
5757
`ssh java-tron@$stest_server -p 22008 sh /data/workspace/docker_workspace/do_stest.sh >$stestlogname 2>&1` &
5858
sleep 300 && echo $TRAVIS_BRANCH &
5959
wait
6060
fi
61-
echo "stest start"
61+
echo "Starting stest"
6262
cat $stestlogname | grep "Stest result is:" -A 10000
6363
echo "stest end"
6464

@@ -71,7 +71,7 @@ if [[ "$TRAVIS_BRANCH" = "develop" || "$TRAVIS_BRANCH" = "master" ]];then
7171
exit 1
7272
fi
7373
fi
74-
echo "bye bye"
74+
echo "Closing"
7575
echo $stest_server
7676
rm -f $stestlogname
77-
exit 0
77+
exit 0

0 commit comments

Comments
 (0)