From 3b438d58a929a43d88805dec6581a3d22046f88c Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <86140903+cubxxw@users.noreply.github.com> Date: Fri, 14 Jul 2023 11:32:14 +0800 Subject: [PATCH] fix: scripts and release (#552) * fix: scripts and release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: fix bug Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: docker compose and release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: cicd bug Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: cicd bug Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .github/workflows/scripts-test.yml | 20 ++++++++++++-------- docker-compose.yaml | 2 +- scripts/msg_transfer_start.sh | 5 ----- scripts/start_all.sh | 5 +++++ 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml index f2fdc8a19..3b12f2d3c 100644 --- a/.github/workflows/scripts-test.yml +++ b/.github/workflows/scripts-test.yml @@ -28,28 +28,33 @@ jobs: - name: Start Docker Compose run: | - docker-compose stop - docker-compose up -d + docker compose stop + sleep 30 + docker compose up -d sleep 60 + continue-on-error: true - name: Stop all services run: | chmod +x ./scripts/stop_all.sh ./scripts/stop_all.sh + cat logs/openIM.log 2>/dev/null shell: bash + continue-on-error: true - name: Build all services run: | chmod +x ./scripts/build_all_service.sh ./scripts/build_all_service.sh - cat logs/openIM.log + cat logs/openIM.log 2>/dev/null shell: bash + continue-on-error: true - name: Start all services run: | chmod +x ./scripts/start_all.sh ./scripts/start_all.sh - cat logs/openIM.log + cat logs/openIM.log 2>/dev/null continue-on-error: true shell: bash @@ -57,13 +62,12 @@ jobs: run: | chmod +x ./scripts/check_all.sh ./scripts/check_all.sh - cat logs/openIM.log + cat logs/openIM.log 2>/dev/null shell: bash - continue-on-error: true - name: Print openIM.log run: | - cat logs/openIM.log - cat logs/openIM.log >> "$GITHUB_OUTPUT" + cat logs/* 2>/dev/null + cat logs/* 2>/dev/null >> "$GITHUB_OUTPUT" shell: bash continue-on-error: true diff --git a/docker-compose.yaml b/docker-compose.yaml index 842b05ae5..a658f2d8a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -100,7 +100,7 @@ services: openim_server: - image: ghcr.io/openimsdk/openim-server:v3.0.0-alpha.1 + image: ghcr.io/openimsdk/openim-server:v3.0.0-rc.2 container_name: openim-server volumes: - ./logs:/Open-IM-Server/logs diff --git a/scripts/msg_transfer_start.sh b/scripts/msg_transfer_start.sh index 2e03b4b1a..b1e17769d 100755 --- a/scripts/msg_transfer_start.sh +++ b/scripts/msg_transfer_start.sh @@ -22,11 +22,6 @@ source $SCRIPTS_ROOT/style_info.sh source $SCRIPTS_ROOT/path_info.sh source $SCRIPTS_ROOT/function.sh -cd $SCRIPTS_ROOT - -chmod +x build_all_service.sh -./build_all_service.sh - echo -e "${YELLOW_PREFIX}=======>SCRIPTS_ROOT=$SCRIPTS_ROOT${COLOR_SUFFIX}" echo -e "${YELLOW_PREFIX}=======>OPENIM_ROOT=$OPENIM_ROOT${COLOR_SUFFIX}" echo -e "${YELLOW_PREFIX}=======>pwd=$PWD${COLOR_SUFFIX}" diff --git a/scripts/start_all.sh b/scripts/start_all.sh index 244428539..b49997aa2 100755 --- a/scripts/start_all.sh +++ b/scripts/start_all.sh @@ -27,6 +27,11 @@ source $SCRIPTS_ROOT/function.sh cd $SCRIPTS_ROOT +if [ ! -d "${OPENIM_ROOT}/_output/bin/platforms" ]; then + # exec build_all_service.sh + "${SCRIPTS_ROOT}/build_all_service.sh" +fi + echo -e "${YELLOW_PREFIX}=======>SCRIPTS_ROOT=$SCRIPTS_ROOT${COLOR_SUFFIX}" echo -e "${YELLOW_PREFIX}=======>OPENIM_ROOT=$OPENIM_ROOT${COLOR_SUFFIX}" echo -e "${YELLOW_PREFIX}=======>pwd=$PWD${COLOR_SUFFIX}"