release: bump version to 0.72.0
Some checks failed
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
ci / delivery (push) Has been cancelled
release / images (push) Has been cancelled

This commit is contained in:
linkong
2026-06-29 14:05:06 +08:00
parent 3265d22af5
commit 19d5ac0fee
60 changed files with 3702 additions and 678 deletions

View File

@@ -3,21 +3,21 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
DOCKER_SMOKE="${PLANET_HARNESS_DOCKER_SMOKE:-0}"
source "$ROOT_DIR/scripts/harness/lib.sh"
run() {
printf "+ %s\n" "$*" >&2
"$@"
}
DOCKER_SMOKE="${PLANET_HARNESS_DOCKER_SMOKE:-0}"
FRONTEND_SMOKE="${PLANET_HARNESS_FRONTEND_SMOKE:-1}"
FRONTEND_SMOKE_PORT="${PLANET_HARNESS_FRONTEND_SMOKE_PORT:-4173}"
run_helm_smoke_if_available() {
if ! command -v helm >/dev/null 2>&1; then
local helm_bin
if ! helm_bin="$(harness_find_cmd helm)"; then
printf "warn: helm not found; skipping Helm lint/template smoke\n"
return 0
fi
run helm lint deploy/helm/planet
run helm template planet-staging deploy/helm/planet \
harness_run "$helm_bin" lint deploy/helm/planet
harness_run "$helm_bin" template planet-staging deploy/helm/planet \
--namespace planet-staging \
-f deploy/helm/planet/values.single-node.yaml \
--set image.tag=harness-smoke >/tmp/planet-harness-rendered.yaml
@@ -33,27 +33,83 @@ run_docker_smoke_if_requested() {
;;
esac
if ! command -v docker >/dev/null 2>&1; then
local docker_bin
if ! docker_bin="$(harness_find_cmd docker)"; then
printf "fail: docker not found; cannot run requested image smoke builds\n"
return 1
fi
run docker build -t planet-harness/frontend:smoke ./frontend
run docker build -t planet-harness/backend:smoke -f backend/Dockerfile .
run docker build -t planet-harness/aiprovider:smoke -f aiprovider/Dockerfile .
harness_run "$docker_bin" build -t planet-harness/frontend:smoke ./frontend
harness_run "$docker_bin" build -t planet-harness/backend:smoke -f backend/Dockerfile .
harness_run "$docker_bin" build -t planet-harness/aiprovider:smoke -f aiprovider/Dockerfile .
}
wait_for_frontend_preview() {
local bun_bin="$1"
local url="$2"
local attempts=60
local index=0
while [ "$index" -lt "$attempts" ]; do
if PLANET_FRONTEND_SMOKE_URL="$url" "$bun_bin" -e \
'fetch(process.env.PLANET_FRONTEND_SMOKE_URL).then((r) => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))' \
>/dev/null 2>&1; then
return 0
fi
index=$((index + 1))
sleep 1
done
return 1
}
run_frontend_smoke_if_enabled() {
local bun_bin="$1"
case "$FRONTEND_SMOKE" in
0|false|no|off)
printf "info: frontend Playwright smoke skipped; set PLANET_HARNESS_FRONTEND_SMOKE=1 to enable\n"
return 0
;;
esac
local url="http://127.0.0.1:${FRONTEND_SMOKE_PORT}"
local log_path="/tmp/planet-harness-frontend-preview.log"
(
cd "$ROOT_DIR/frontend"
"$bun_bin" ./node_modules/vite/bin/vite.js preview \
--host 127.0.0.1 \
--port "$FRONTEND_SMOKE_PORT" \
--strictPort
) >"$log_path" 2>&1 &
local preview_pid=$!
if ! wait_for_frontend_preview "$bun_bin" "$url"; then
printf "fail: frontend preview did not become ready at %s\n" "$url"
printf "preview log: %s\n" "$log_path"
kill "$preview_pid" >/dev/null 2>&1 || true
wait "$preview_pid" >/dev/null 2>&1 || true
return 1
fi
local smoke_status=0
PLANET_FRONTEND_SMOKE_URL="$url" harness_run "$bun_bin" "$ROOT_DIR/scripts/harness/frontend-smoke.mjs" || smoke_status=$?
kill "$preview_pid" >/dev/null 2>&1 || true
wait "$preview_pid" >/dev/null 2>&1 || true
return "$smoke_status"
}
main() {
cd "$ROOT_DIR"
local bun_bin
bun_bin="$(harness_require_tool bun)"
run scripts/harness/quick-check.sh
harness_run scripts/harness/quick-check.sh
(
cd "$ROOT_DIR/frontend"
run bun install --frozen-lockfile
run bun run build
harness_run "$bun_bin" install --frozen-lockfile
harness_run "$bun_bin" run build
)
run_frontend_smoke_if_enabled "$bun_bin"
run_helm_smoke_if_available
run_docker_smoke_if_requested