fix: keep setup wizard preflight successful
Release / release (push) Failing after 37s

This commit is contained in:
Qiufeng
2026-08-17 17:56:57 +08:00
parent 74585a5f07
commit 8d63d60df5
4 changed files with 21 additions and 17 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ umask 077
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
INSTALLER="$ROOT/deploy/install.sh"
INSTALLER_SHA256=${KAIDI_INSTALLER_SHA256:-95a5887809edaf1e4ed6201224c4d2d122388c0289a83e2c960a0641d9671664}
INSTALLER_SHA256=${KAIDI_INSTALLER_SHA256:-824ec6eb5b8bad97485d5c8beb3af93352fd12b1ee631b15a5b9bee38fcb5e67}
RELEASE_API_URL=${KAIDI_RELEASE_API_URL:-https://git.awaioi.com/api/v1/repos/ERP-Team/kaidi/releases/latest}
PUBLIC_KEY_SHA256=${KAIDI_RELEASE_PUBLIC_KEY_SHA256:-807c6aec1dc3f7ce494db16aa9d763c66f292033c38f328afd0390d2715a8cd9}
TOKEN_FILE=${KAIDI_RELEASE_TOKEN_FILE:-}
+5 -5
View File
@@ -210,7 +210,7 @@ prepare_java() {
ln -s "$system_home" "$JAVA_STAGED_DIR"
log "Using existing Java 17 runtime at $system_home"
"$JAVA_STAGED_DIR/bin/java" -version
return
return 0
fi
log "No local Java 17 runtime found; downloading the official Azul Java 17 runtime"
api="https://api.azul.com/metadata/v1/zulu/packages/?java_version=17&os=linux&arch=$(azul_arch)&archive_type=tar.gz&java_package_type=jre&release_status=ga&availability_types=CA&latest=true"
@@ -388,7 +388,7 @@ configure_database() {
DB_URL='jdbc:mysql://setup.invalid:3306/kaidi_finance'
DB_USERNAME=setup_pending
DB_PASSWORD=setup_pending
return
return 0
fi
if [ "$REINSTALL" = true ]; then
[ -s "$CONFIG_ROOT/kaidi.env" ] || die "KAIDI_REINSTALL needs the existing $CONFIG_ROOT/kaidi.env"
@@ -403,7 +403,7 @@ configure_database() {
if [ -n "$DB_URL" ]; then
[ -n "$DB_USERNAME" ] && [ -n "$DB_PASSWORD" ] \
|| die "KAIDI_DB_USERNAME and KAIDI_DB_PASSWORD are required with KAIDI_DB_URL"
return
return 0
fi
[ "$REINSTALL" != true ] \
|| die "KAIDI_REINSTALL needs database credentials in the existing installation or command environment"
@@ -436,7 +436,7 @@ database_name() {
preflight_database() {
local client host port name version table
[ "$SETUP_WIZARD" != true ] || return
[ "$SETUP_WIZARD" != true ] || return 0
case "$DB_URL" in
jdbc:mysql://*) ;;
*) die "KAIDI_DB_URL must start with jdbc:mysql://" ;;
@@ -541,7 +541,7 @@ wait_for_health() {
local attempts=0
while [ "$attempts" -lt 60 ]; do
if curl -fsS "$HEALTH_URL" | jq -e '.status == "UP"' >/dev/null 2>&1; then
return
return 0
fi
attempts=$((attempts + 1))
sleep 2