feat: Enhanced Automation for OpenIM Advanced CICD and GitOps Support (#1819)

* feat: add advanced version cicd

* fix: fix openim server deployment
This commit is contained in:
Xinwei Xiong
2024-01-26 20:53:25 +08:00
committed by GitHub
parent 05e66e9f8d
commit e2650add40
6 changed files with 102 additions and 7 deletions
+5 -4
View File
@@ -69,17 +69,18 @@ ${DOCKER_COMPOSE_COMMAND} up -d
check_containers() {
if ! ${DOCKER_COMPOSE_COMMAND} ps | grep -q 'Up'; then
echo "Error: One or more docker containers failed to start."
${DOCKER_COMPOSE_COMMAND} logs
${DOCKER_COMPOSE_COMMAND} logs openim-server
${DOCKER_COMPOSE_COMMAND} logs openim-chat
return 1
fi
return 0
}
# Wait for a short period to allow containers to initialize
sleep 30
check_containers
sleep 100
${DOCKER_COMPOSE_COMMAND} logs openim-server
${DOCKER_COMPOSE_COMMAND} ps
check_containers
popd
+4 -1
View File
@@ -25,6 +25,7 @@
readonly BUCKET="openim-1306374445"
readonly REGION="ap-guangzhou"
readonly COS_RELEASE_DIR="openim-release"
# readonly COS_RELEASE_DIR="openim-advanced-release" # !pro
# default cos command tool coscli or coscmd
readonly COSTOOL="coscli"
@@ -37,9 +38,11 @@ readonly RELEASE_IMAGES="${LOCAL_OUTPUT_ROOT}/release-images"
# OpenIM github account info
readonly OPENIM_GITHUB_ORG=openimsdk
readonly OPENIM_GITHUB_REPO=open-im-server
readonly CHAT_GITHUB_REPO=chat
# readonly OPENIM_GITHUB_REPO=open-im-server-enterprise # !pro
readonly ARTIFACT=openim.tar.gz
# readonly ARTIFACT=openim-enterprise.tar.gz # !pro
readonly CHECKSUM=${ARTIFACT}.sha1sum
OPENIM_BUILD_CONFORMANCE=${OPENIM_BUILD_CONFORMANCE:-y}
+2 -1
View File
@@ -45,7 +45,8 @@ endif
IMAGES_DIR ?= $(wildcard ${ROOT_DIR}/build/images/*)
# Determine images names by stripping out the dir names, and filter out the undesired directories
# IMAGES ?= $(filter-out Dockerfile,$(foreach image,${IMAGES_DIR},$(notdir ${image})))
IMAGES ?= $(filter-out Dockerfile openim-tools openim-cmdutils,$(foreach image,${IMAGES_DIR},$(notdir ${image})))
IMAGES ?= $(filter-out Dockerfile openim-tools openim-rpc-extend-msg openim-rpc-encryption openim-cmdutils,$(foreach image,${IMAGES_DIR},$(notdir ${image})))
# IMAGES ?= $(filter-out Dockerfile openim-tools openim-cmdutils,$(foreach image,${IMAGES_DIR},$(notdir ${image}))) # !pro
ifeq (${IMAGES},)
$(error Could not determine IMAGES, set ROOT_DIR or run in source dir)
+1 -1
View File
@@ -130,7 +130,7 @@ perform_action() {
if [ "$flag" == true ]; then
openim::log::info "## $message..."
if ! $command; then
if ! eval "$command"; then
openim::log::errexit "Error in $message"
fi
fi