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
+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