This is an automated email from the ASF dual-hosted git repository.
jave pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 53b62d4 add ds logs and server status check with e2e test (#2277)
53b62d4 is described below
commit 53b62d403feabab4bd67683cb0dbab44f39da9e9
Author: khadgarmage <[email protected]>
AuthorDate: Mon Mar 23 14:40:08 2020 +0800
add ds logs and server status check with e2e test (#2277)
---
.github/workflows/ci_e2e.yml | 14 +++++++++-----
dockerfile/hooks/check | 10 +++++++++-
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci_e2e.yml b/.github/workflows/ci_e2e.yml
index fe818d0..7ec204e 100644
--- a/.github/workflows/ci_e2e.yml
+++ b/.github/workflows/ci_e2e.yml
@@ -49,7 +49,8 @@ jobs:
- name: Docker Run
run: |
VERSION=`cat $(pwd)/pom.xml| grep "SNAPSHOT</version>" | awk -F
"-SNAPSHOT" '{print $1}' | awk -F ">" '{print $2}'`
- docker run -dit -e POSTGRESQL_USERNAME=test -e
POSTGRESQL_PASSWORD=test -p 8888:8888 dolphinscheduler:$VERSION all
+ mkdir -p /tmp/logs
+ docker run -dit -e POSTGRESQL_USERNAME=test -e
POSTGRESQL_PASSWORD=test -v /tmp/logs:/opt/dolphinscheduler/logs -p 8888:8888
dolphinscheduler:$VERSION all
- name: Check Server Status
run: sh ./dockerfile/hooks/check
- name: Prepare e2e env
@@ -65,7 +66,10 @@ jobs:
- name: Run e2e Test
run: cd ./e2e && mvn -B clean test
- name: Collect logs
- run: |
- mkdir -p ${LOG_DIR}
- docker logs dolphinscheduler > ${LOG_DIR}/dolphinscheduler.txt
- continue-on-error: true
+ if: failure()
+ uses: actions/upload-artifact@v1
+ with:
+ name: dslogs
+ path: /tmp/logs
+
+
diff --git a/dockerfile/hooks/check b/dockerfile/hooks/check
index 21f3f4d..fdb1902 100644
--- a/dockerfile/hooks/check
+++ b/dockerfile/hooks/check
@@ -16,7 +16,7 @@
# limitations under the License.
#
echo "------ dolphinscheduler check - server - status -------"
-sleep 20
+sleep 60
server_num=$(docker top `docker container list | grep '/sbin/tini' | awk
'{print $1}'`| grep java | grep "dolphinscheduler" | awk -F 'classpath '
'{print $2}' | awk '{print $2}' | sort | uniq -c | wc -l)
if [ $server_num -eq 5 ]
then
@@ -25,3 +25,11 @@ else
echo "Server start failed "$server_num
exit 1
fi
+ready=`curl http://127.0.0.1:8888/dolphinscheduler/login -d
'userName=admin&userPassword=dolphinscheduler123' -v | grep "login success" |
wc -l`
+if [ $ready -eq 1 ]
+then
+ echo "Servers is ready"
+else
+ echo "Servers is not ready"
+ exit 1
+fi