63 lines
3.3 KiB
Bash
63 lines
3.3 KiB
Bash
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
python scripts/rc_readiness.py
|
|
|
|
(cd backend && python -m compileall -q src tests)
|
|
(cd backend && python -m ruff check src tests)
|
|
(cd backend && python -m mypy src)
|
|
(cd backend && python -m pytest -q)
|
|
(cd node-agent && python -m compileall -q src tests)
|
|
(cd node-agent && python -m ruff check src tests)
|
|
(cd node-agent && python -m mypy src)
|
|
(cd node-agent && python -m pytest -q)
|
|
(cd runtime-worker && python -m compileall -q src tests)
|
|
(cd runtime-worker && python -m ruff check src tests)
|
|
(cd runtime-worker && python -m mypy src)
|
|
(cd runtime-worker && python -m pytest -q)
|
|
(cd frontend && npm test -- --run)
|
|
(cd frontend && npm run build)
|
|
node --test clients/typescript/modelforge-client.test.mjs
|
|
# The console's API origin is compiled into the bundle, so a release image can be wrong while every
|
|
# source-level check is green. Only assert this when a candidate image already exists locally.
|
|
if docker image inspect "modelforge-web:$(cat VERSION)" >/dev/null 2>&1; then
|
|
python scripts/release_image_acceptance.py \
|
|
--image "modelforge-web:$(cat VERSION)" \
|
|
--expect-origin "${MODELFORGE_PUBLIC_API_ORIGIN:-http://localhost:8000}" \
|
|
--version "$(cat VERSION)"
|
|
else
|
|
printf '%s\n' "console release-image acceptance skipped: no modelforge-web:$(cat VERSION) built"
|
|
fi
|
|
# Render only with synthetic inputs, never the operator's live credentials.
|
|
(
|
|
export MODELFORGE_POSTGRES_DB=modelforge
|
|
export VITE_API_BASE_URL=http://127.0.0.1:8000
|
|
export MODELFORGE_CORS_ORIGINS=http://127.0.0.1:3000
|
|
export MODELFORGE_VERSION="$(cat VERSION)"
|
|
export MODELFORGE_OPERATOR_API_KEY=compose-validation-operator-not-for-production
|
|
export MODELFORGE_BACKUP_ENCRYPTION_KEY=compose-validation-backup-not-for-production
|
|
export MODELFORGE_POSTGRES_ADMIN_PASSWORD=compose-validation-admin
|
|
export MODELFORGE_MIGRATION_DB_PASSWORD=compose-validation-owner
|
|
export MODELFORGE_RUNTIME_DB_PASSWORD=compose-validation-runtime
|
|
export MODELFORGE_RUNTIME_DATABASE_URL=postgresql+psycopg://modelforge_runtime:compose-validation-runtime@postgres:5432/modelforge
|
|
export MODELFORGE_MIGRATION_DATABASE_URL=postgresql+psycopg://modelforge:compose-validation-owner@postgres:5432/modelforge
|
|
for overlay in production backup dr node-recovery; do
|
|
docker compose --env-file .env.example -f docker-compose.yml -f "docker-compose.${overlay}.yml" config --quiet
|
|
done
|
|
docker compose --env-file .env.example config --quiet
|
|
docker compose --env-file .env.example -f docker-compose.yml -f docker-compose.gpu.yml config --quiet
|
|
docker compose --env-file .env.example -f docker-compose.node-agent.yml config --quiet
|
|
docker compose --env-file .env.example -f docker-compose.node-agent.yml \
|
|
-f docker-compose.runtime-worker.yml config --quiet
|
|
MODELFORGE_AGENT_CA_CERT_PATH=./validation-ca.crt \
|
|
MODELFORGE_AGENT_CONTROL_PLANE_HOST_ADDRESS=192.0.2.10 \
|
|
docker compose --env-file .env.example -f docker-compose.node-agent.yml \
|
|
-f docker-compose.node-agent.private-ca.yml config --quiet
|
|
MODELFORGE_AGENT_CA_CERT_PATH=./validation-ca.crt \
|
|
MODELFORGE_AGENT_CONTROL_PLANE_HOST_ADDRESS=192.0.2.10 \
|
|
docker compose --env-file .env.example -f docker-compose.node-agent.yml \
|
|
-f docker-compose.node-agent.private-ca.yml -f docker-compose.runtime-worker.yml \
|
|
-f docker-compose.runtime-worker.private-ca.yml config --quiet
|
|
)
|
|
printf '%s\n' 'ModelForge component and Compose checks passed.'
|