refactor: consolidate CI and local dev orchestration (#108)
## Summary - Extract shared bootstrap functions into `scripts/bootstrap-common.sh` (eliminates ~120 lines of duplicated forge/cast commands from e2e.yml) - Create reusable `scripts/wait-for-service.sh` for health checks (replaces 60-line inline wait-for-stack) - Merge dev and CI entrypoints into unified scripts branching on `CI` env var (delete `docker/ci-entrypoints/`) - Replace 4 per-service CI Dockerfiles with parameterized `docker/Dockerfile.service-ci` - Add `sync-tax-rates.mjs` to CI image builder stage - Fix: CI now grants txnBot recenter access (was missing) - Fix: txnBot funding parameterized (CI=10eth, local=1eth) - Delete 5 obsolete migration docs and 4 DinD integration files Net: -1540 lines removed Closes #107 ## Test plan - [ ] E2E pipeline passes (bootstrap sources shared script, services use old images with commands override) - [ ] build-ci-images pipeline builds all 4 services with unified Dockerfile - [ ] Local dev stack boots via `./scripts/dev.sh start` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: openhands <openhands@all-hands.dev> Reviewed-on: https://codeberg.org/johba/harb/pulls/108
This commit is contained in:
parent
4277f19b68
commit
e5e1308e72
45 changed files with 882 additions and 2627 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Build and push CI images for E2E testing
|
||||
# Build CI images locally using the unified Dockerfile.service-ci
|
||||
# For CI pipeline builds, see .woodpecker/build-ci-images.yml
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
|
@ -15,7 +16,12 @@ echo "Tag: $TAG"
|
|||
echo ""
|
||||
echo "=== Building ponder-ci ==="
|
||||
docker build \
|
||||
-f docker/Dockerfile.ponder-ci \
|
||||
-f docker/Dockerfile.service-ci \
|
||||
--build-arg SERVICE_DIR=services/ponder \
|
||||
--build-arg SERVICE_PORT=42069 \
|
||||
--build-arg ENTRYPOINT_SCRIPT=containers/ponder-entrypoint.sh \
|
||||
--build-arg HEALTHCHECK_RETRIES=12 \
|
||||
--build-arg HEALTHCHECK_START=20s \
|
||||
-t "$REGISTRY/harb/ponder-ci:$TAG" \
|
||||
.
|
||||
|
||||
|
|
@ -23,7 +29,15 @@ docker build \
|
|||
echo ""
|
||||
echo "=== Building webapp-ci ==="
|
||||
docker build \
|
||||
-f docker/Dockerfile.webapp-ci \
|
||||
-f docker/Dockerfile.service-ci \
|
||||
--build-arg SERVICE_DIR=web-app \
|
||||
--build-arg SERVICE_PORT=5173 \
|
||||
--build-arg HEALTHCHECK_PATH=/app/ \
|
||||
--build-arg HEALTHCHECK_RETRIES=84 \
|
||||
--build-arg HEALTHCHECK_START=15s \
|
||||
--build-arg ENTRYPOINT_SCRIPT=containers/webapp-entrypoint.sh \
|
||||
--build-arg NODE_ENV=development \
|
||||
--build-arg NEEDS_SYMLINKS=true \
|
||||
-t "$REGISTRY/harb/webapp-ci:$TAG" \
|
||||
.
|
||||
|
||||
|
|
@ -31,7 +45,13 @@ docker build \
|
|||
echo ""
|
||||
echo "=== Building landing-ci ==="
|
||||
docker build \
|
||||
-f docker/Dockerfile.landing-ci \
|
||||
-f docker/Dockerfile.service-ci \
|
||||
--build-arg SERVICE_DIR=landing \
|
||||
--build-arg SERVICE_PORT=5174 \
|
||||
--build-arg ENTRYPOINT_SCRIPT=containers/landing-ci-entrypoint.sh \
|
||||
--build-arg NODE_ENV=development \
|
||||
--build-arg HEALTHCHECK_RETRIES=6 \
|
||||
--build-arg HEALTHCHECK_START=10s \
|
||||
-t "$REGISTRY/harb/landing-ci:$TAG" \
|
||||
.
|
||||
|
||||
|
|
@ -39,7 +59,14 @@ docker build \
|
|||
echo ""
|
||||
echo "=== Building txnbot-ci ==="
|
||||
docker build \
|
||||
-f docker/Dockerfile.txnbot-ci \
|
||||
-f docker/Dockerfile.service-ci \
|
||||
--build-arg SERVICE_DIR=services/txnBot \
|
||||
--build-arg SERVICE_PORT=43069 \
|
||||
--build-arg HEALTHCHECK_PATH=/status \
|
||||
--build-arg HEALTHCHECK_RETRIES=4 \
|
||||
--build-arg HEALTHCHECK_START=10s \
|
||||
--build-arg ENTRYPOINT_SCRIPT=containers/txnbot-entrypoint.sh \
|
||||
--build-arg NPM_INSTALL_CMD=install \
|
||||
-t "$REGISTRY/harb/txnbot-ci:$TAG" \
|
||||
.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue