release: bump version to 0.71.1
This commit is contained in:
63
scripts/harness/validate.sh
Executable file
63
scripts/harness/validate.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
DOCKER_SMOKE="${PLANET_HARNESS_DOCKER_SMOKE:-0}"
|
||||
|
||||
run() {
|
||||
printf "+ %s\n" "$*" >&2
|
||||
"$@"
|
||||
}
|
||||
|
||||
run_helm_smoke_if_available() {
|
||||
if ! command -v helm >/dev/null 2>&1; 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 \
|
||||
--namespace planet-staging \
|
||||
-f deploy/helm/planet/values.single-node.yaml \
|
||||
--set image.tag=harness-smoke >/tmp/planet-harness-rendered.yaml
|
||||
}
|
||||
|
||||
run_docker_smoke_if_requested() {
|
||||
case "$DOCKER_SMOKE" in
|
||||
1|true|yes|on)
|
||||
;;
|
||||
*)
|
||||
printf "info: Docker image smoke skipped; set PLANET_HARNESS_DOCKER_SMOKE=1 to enable\n"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if ! command -v docker >/dev/null 2>&1; 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 .
|
||||
}
|
||||
|
||||
main() {
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
run scripts/harness/quick-check.sh
|
||||
|
||||
(
|
||||
cd "$ROOT_DIR/frontend"
|
||||
run bun install --frozen-lockfile
|
||||
run bun run build
|
||||
)
|
||||
|
||||
run_helm_smoke_if_available
|
||||
run_docker_smoke_if_requested
|
||||
|
||||
printf "harness validation passed\n"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user