- ci.yml: actions/checkout into the runner workspace instead of cd-ing into a
hard-coded host path and `git reset --hard origin/main` on the live checkout;
install via `pnpm install:gitea` (self-contained, no sibling common-plat
checkout); E2E step left as a TODO pointer (ci-e2e-hardening, Phase 5 P2).
- Fix the same stale /opt/bytelyst/bytelyst-devops-tools path in deploy.sh,
scripts/deploy-hotcopy.sh, DEPLOYMENT.md, DEPLOYMENT_GUIDE.md.
- Replace the no-op `lint` echoes with real ESLint 9 flat configs (js +
typescript-eslint recommended) for backend and web; add a root `pnpm lint`.
- Fix the 10 errors lint surfaced, incl. require('os') in an ESM backend
(system/repository.ts -> import * as os), prefer-const x4, and a ternary
expression-statement in web vm/page.tsx.
Verified locally: secret-scan, lint (0 errors; correctly fails on bad code),
typecheck, unit tests (backend 9 / web 11), and build all green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
echo "Building DevOps web and backend artifacts..."
|
|
cd /opt/bytelyst/learning_ai_devops_tools/dashboard/web && pnpm build
|
|
cd /opt/bytelyst/learning_ai_devops_tools/dashboard/backend && pnpm build
|
|
|
|
echo "Copying frontend assets into devops-web..."
|
|
docker cp web/.next devops-web:/app/web/.next
|
|
|
|
echo "Copying backend bundle into devops-backend..."
|
|
docker cp backend/dist devops-backend:/app/backend/dist
|
|
|
|
echo "Restarting devops-backend..."
|
|
docker restart devops-backend >/dev/null
|
|
|
|
echo "Waiting for backend readiness..."
|
|
for _ in 1 2 3 4 5 6 7 8 9 10; do
|
|
READY_JSON="$(curl -s http://127.0.0.1:4004/health || true)"
|
|
echo "$READY_JSON" | grep -q '"status":"ok"' && break
|
|
sleep 2
|
|
done
|
|
|
|
echo "Restarting devops-web..."
|
|
docker restart devops-web >/dev/null
|
|
|
|
echo "Waiting for web readiness..."
|
|
for _ in 1 2 3 4 5 6 7 8 9 10; do
|
|
if curl -s http://127.0.0.1:3049 > /dev/null; then
|
|
break
|
|
fi
|
|
sleep 2
|
|
done
|
|
|
|
echo "DevOps Dashboard hotcopy deployment complete"
|
|
echo "Backend health:"
|
|
curl -s http://127.0.0.1:4004/health
|
|
echo ""
|
|
echo "Web status:"
|
|
curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3049
|