fix: 调试发布run

This commit is contained in:
npc0-hue
2026-07-22 11:44:48 +08:00
parent b06623d0ce
commit 6c3eb6e45f
41 changed files with 1289 additions and 206 deletions
+10 -5
View File
@@ -5,8 +5,9 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck source=scripts/local-debug-env.sh
source "$ROOT_DIR/scripts/local-debug-env.sh"
mkdir -p "$LOCAL_DEBUG_LOG_DIR" "$LOCAL_DEBUG_PID_DIR" "$PLATFORM_DATA_DIR" "$PLATFORM_LOG_DIR" "$RUN_WORKSPACE_ROOT" "$RUN_SPOOL_ROOT"
mkdir -p "$LOCAL_DEBUG_LOG_DIR" "$LOCAL_DEBUG_PID_DIR" "$PLATFORM_DATA_DIR" "$PLATFORM_LOG_DIR" "$RUN_WORKSPACE_ROOT" "$RUN_SPOOL_ROOT" "$RUN_BUILD_BUCKET_ROOT"
mkdir -p "$GOCACHE"
local_debug_prepare_run_lifecycle_templates
managed_pid_running() {
local pid_file="$1"
@@ -133,7 +134,10 @@ wait_for_run_registration() {
printf 'local debug root: %s\n' "$LOCAL_DEBUG_ROOT"
printf 'platform: %s\n' "$(local_debug_platform_url)"
printf 'platform_web: %s\n' "$(local_debug_web_url)"
printf 'run repo: %s\n' "$RUN_REPO_DIR"
printf 'run source: %s\n' "$RUN_SOURCE_DIR"
printf 'run build bucket: %s\n' "$RUN_BUILD_BUCKET_ROOT"
printf 'run build source snapshot: %s\n' "$RUN_BUILD_SOURCE_ROOT"
printf 'run bootstrap binary: %s\n' "$RUN_BOOTSTRAP_BIN"
printf 'platform log: %s\n' "$LOCAL_DEBUG_LOG_DIR/platform.log"
printf 'run log: %s\n' "$LOCAL_DEBUG_LOG_DIR/run.log"
printf 'platform_web log: %s\n' "$LOCAL_DEBUG_LOG_DIR/platform_web.log"
@@ -156,8 +160,8 @@ start_service platform "$ROOT_DIR/platform" env \
wait_for_url platform "$(local_debug_platform_url)/healthz"
ensure_local_run_repo
start_service run "$RUN_REPO_DIR" env \
local_debug_build_bootstrap_run
start_service run "$(dirname "$RUN_BOOTSTRAP_BIN")" env \
GOCACHE="$GOCACHE" \
RUN_MODE="$RUN_MODE" \
RUN_PLATFORM_URL="$RUN_PLATFORM_URL" \
@@ -166,12 +170,13 @@ start_service run "$RUN_REPO_DIR" env \
RUN_VERSION="$RUN_VERSION" \
RUN_REGISTRATION_TOKEN="$RUN_REGISTRATION_TOKEN" \
RUN_WORKSPACE_ROOT="$RUN_WORKSPACE_ROOT" \
RUN_BUILD_SOURCE_ROOT="$RUN_BUILD_SOURCE_ROOT" \
RUN_SPOOL_ROOT="$RUN_SPOOL_ROOT" \
RUN_MAX_JOBS="$RUN_MAX_JOBS" \
RUN_HEARTBEAT_INTERVAL_MS="$RUN_HEARTBEAT_INTERVAL_MS" \
RUN_POLL_INTERVAL_MS="$RUN_POLL_INTERVAL_MS" \
RUN_RETRY_BACKOFF_MS="$RUN_RETRY_BACKOFF_MS" \
go run ./cmd/run
"$RUN_BOOTSTRAP_BIN"
wait_for_run_registration