문제: 살아 있는 문서가 지운 workflow·태스크·job과 옛 동작을 가리켰다. - 단계 구성이 네 곳에 따로 적혔고 둘이 틀렸다. TESTING_STRATEGY의 repository 목록은 releaseCheck를 「ci + ...」라 했고, docs/build.md의 mainCheck· qualificationCheck 행은 testQualityCheck·verifyFeatureScaffold·graphqlStableTest를 빠뜨렸다. - capability-status가 지운 redis-sdk-topology.yml·notification-platform.yml· verifyNotificationEvidence, app-bootstrap의 OutboxConfig(지금 :composition:outbox-relay), 없는 lane 이름을 증거로 들었다. 제거된 코드 표의 재배치 전 경로는 설명 없이 지금 트리에 없었다. - docs/build.md·bootstrap-local.sh가 기본 조립이 Flyway를 돈다고 했다(기본은 web뿐). 알림 키 개수를 복사해 틀렸다. - roadmap messaging-r2가 지운 VerifyMessagingEvidenceTask· MessagingQualificationPlugin을 예시로 들었다. - cache-redis README·build.gradle, httpclient build.gradle이 #13이 합친 integration job을 가리켰다. - renovate.json·취약점 정책이 「두 봇」과 GitHub vulnerability alert를 전제했다. 이 Gitea repo에 Renovate 실행기는 없다. - graphql AGENTS·README가 「모듈별 yml 금지·없음」이라 했지만 leaf는 config/graphql.yml을 직접 읽는다. 지운 execution profile을 적었다. 고친 것: 단계 구성은 gates.md 1절과 루트 build.gradle을 정본으로 가리키고, 남긴 표 행은 지금 태스크대로 고쳤다. capability-status 행 넷을 지금 job·태스크·모듈로 고치고, 제거된 코드 표의 경로가 지운 때의 배치라는 머리말과 지운 ComposeMergeCharacterizationTest 행을 더했다. 기본 조립·Flyway 설명, 알림 키(개수 대신 registry), roadmap(`> 이력`), 세 integration 설명(`main` job이 :integrationCheck :mainCheck를 함께 돈다), renovate·정책(실행기 없음, enforced는 trivy), graphql 설정 파일 설명을 고쳤다. 검증: check-docs.py·check-work-docs.py rc=0, 이 문서들을 읽는 시험은 CapabilityStatusDocumentTest(app-bootstrap document-contract)다. Refs: RR9-04-09, RR9-04-10, RR9-04-20, RR9-04-21, RR9-04-22, RR9-04-25, RR9-04-28, RR9-03-30
67 lines
3.1 KiB
Bash
Executable File
67 lines
3.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# The ordered local start-up: compile, Docker preflight, dependency wait, migrate-and-start, smoke.
|
|
#
|
|
# scripts/bootstrap-local.sh
|
|
#
|
|
# It runs the development stack, compose.yaml at the repository root: the application container in
|
|
# the `local` runtime and the PostgreSQL service of the `jpa` profile. Naming a service on the
|
|
# command line switches its profile on, so no --profile is needed here.
|
|
#
|
|
# This was the build-logic `ca.developer-bootstrap` plugin (`./gradlew bootstrap`). Starting
|
|
# containers and probing an HTTP endpoint is not a build rule, so it is a script now (review
|
|
# 2026-09-24 BUILD-O3-5). The four stages and their order are unchanged: the next stage starts only
|
|
# when the previous one succeeded, and the app stage waits for the compose healthcheck before the
|
|
# smoke probe runs. The default composition is web only: it opens no datasource and runs no
|
|
# Flyway. A service that adds the persistence-jpa line gets startup Flyway inside the same wait.
|
|
#
|
|
# Until 2026-11-07 it merged docker-compose.yml with docker-compose.local.yml and asked for a `db`
|
|
# service neither file had defined since the database moved to a third file, so the documented
|
|
# first run stopped at stage 2.
|
|
set -euo pipefail
|
|
|
|
readonly repository_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
readonly health_endpoint="${BOOTSTRAP_HEALTH_ENDPOINT:-http://localhost:8080/api/healthcheck}"
|
|
readonly smoke_timeout_seconds="${BOOTSTRAP_SMOKE_TIMEOUT_SECONDS:-60}"
|
|
|
|
if [[ $# -gt 0 ]]; then
|
|
echo "bootstrap: takes no arguments; the stack is compose.yaml. Backing services by profile:" \
|
|
"docker compose --profile <profile> up -d --wait (see the head of compose.yaml)" >&2
|
|
exit 64
|
|
fi
|
|
compose=(docker compose -f "${repository_dir}/compose.yaml")
|
|
|
|
echo "bootstrap 1/4: compiling the default application composition"
|
|
(cd "${repository_dir}" && ./gradlew :app-bootstrap:compileTestJava --console=plain)
|
|
|
|
if ! docker info >/dev/null 2>&1; then
|
|
echo "bootstrap: Docker가 필요합니다. Docker Desktop/daemon을 시작한 뒤 \`docker info\`가 성공하는지 확인하세요." >&2
|
|
exit 69
|
|
fi
|
|
|
|
echo "bootstrap 2/4: starting the PostgreSQL dependency and waiting for readiness"
|
|
"${compose[@]}" up -d --wait db
|
|
|
|
echo "bootstrap 3/4: building and starting the app and waiting for its health"
|
|
"${compose[@]}" up -d --build --wait app
|
|
|
|
echo "bootstrap 4/4: requiring HTTP 200 and status=UP from ${health_endpoint}"
|
|
deadline=$((SECONDS + smoke_timeout_seconds))
|
|
last_result="no response"
|
|
while ((SECONDS < deadline)); do
|
|
if body="$(curl --silent --show-error --max-time 2 --write-out '\n%{http_code}' "${health_endpoint}" 2>&1)"; then
|
|
status="${body##*$'\n'}"
|
|
body="${body%$'\n'*}"
|
|
if [[ "${status}" == "200" && "${body}" == *'"status":"UP"'* ]]; then
|
|
echo "bootstrap: OK — ${health_endpoint} returned HTTP 200 and status=UP."
|
|
exit 0
|
|
fi
|
|
last_result="HTTP ${status}: ${body}"
|
|
else
|
|
last_result="${body}"
|
|
fi
|
|
sleep 1
|
|
done
|
|
echo "bootstrap: ${health_endpoint} did not become healthy within ${smoke_timeout_seconds}s;" \
|
|
"last result: ${last_result}" >&2
|
|
exit 1
|