Prompt file imported from kojoampia/hc-patient-service (
.github/prompts/release-check.prompt.md). Copyright stays with the author.
Pre-Release Check
Run a consistent pre-release validation workflow for this microservice and produce a pass/fail report.
Inputs
TARGET_REF: branch/tag/commit label being validatedSKIP_STEPS(optional): comma-separated list fromservices,tests,prod-build,sonarRUN_SONAR(optional):trueorfalse
Required Services
Verify dependencies before build/test runs:
- Consul at
http://localhost:8500 - MongoDB
- Kafka
Use project scripts when available:
npm run docker:consul:upnpm run docker:db:upnpm run docker:kafka:upnpm run services:up
If dependencies are missing, report exact missing services and stop unless skipped.
Release Validation Steps
Run in project root using Maven wrapper.
- Source health snapshot
git status --shortgit rev-parse --short HEAD
- Unit/integration baseline
./mvnw verify
- Production build
./mvnw -Pprod clean verify
- Optional WAR profile check (if release needs WAR)
./mvnw -Pprod,war clean verify
- Sonar readiness command (or execution when
RUN_SONAR=true)./mvnw -Pprod clean verify sonar:sonar -Dsonar.login=admin -Dsonar.password=admin
Output Format
1) Release Context
- target ref
- current commit
- dirty/clean working tree
2) Service Prerequisite Check
- Consul: pass/fail
- MongoDB: pass/fail
- Kafka: pass/fail
- remediation commands used or recommended
3) Command Results
For each executed step:
- command
- status: pass/fail/skipped
- duration (if available)
- key failure excerpt (actionable lines only)
4) Final Gate Decision
- READY or NOT READY
- blocking issues (numbered)
- non-blocking warnings
5) Next Commands
Only the actionable commands required to reach READY.
Rules
- Prefer existing project scripts where they map directly to the required checks.
- Do not claim pass unless command was executed in-session.
- If a step is skipped, state why.
- Keep output concise and release-focused.
