diff --git a/README.md b/README.md index 2990cd4..4e81f21 100644 --- a/README.md +++ b/README.md @@ -183,9 +183,17 @@ python3 -m pytest tests/ -v bash scripts/run_platform.sh --check-only # Expected: "=== PLATFORM CHECK OK ===" +# Run the headline E2E against the local emulating tier (no AWS credentials +# needed — emulates ECS, outbox, S3 state, Lambda in-process; D-092). +bash scripts/run_platform.sh --local +# Expected: "=== LOCAL E2E OK ===" + # Reproduce the full CI pipeline locally (lint -> test -> check-only) bash scripts/run_ci.sh # Expected: "=== CI PIPELINE OK ===" + +# Show all run_platform.sh flags + a one-line description each. +bash scripts/run_platform.sh --help ``` ### CI/CD pipelines diff --git a/scripts/run_platform.sh b/scripts/run_platform.sh index ff31e25..fb13e28 100755 --- a/scripts/run_platform.sh +++ b/scripts/run_platform.sh @@ -7,6 +7,9 @@ # run_platform.sh --plan-only (AWS plan only, no Checkov/outbox) # run_platform.sh --apply (AWS apply: init/validate/plan/apply) # run_platform.sh --destroy (AWS destroy: init/validate/destroy) +# run_platform.sh --local [contract.yml] (local emulating tier, no AWS) +# run_platform.sh --decommission (gated teardown) +# run_platform.sh --help (show all flags) # # Modes: # --check-only (offline, no AWS/Checkov/DynamoDB — for CI) @@ -17,13 +20,19 @@ # contract -> resolver -> stack -> adapter -> terraform init/validate/plan/apply -> exit 0 # --destroy (requires AWS creds; use --decommission for gated production teardown) # contract -> resolver -> stack -> adapter -> terraform init/validate/destroy -> exit 0 +# --local (no AWS creds; local emulating tier D-092) +# contract -> resolver -> adapter -> local S3/ECS/outbox/Lambda stubs -> exit 0 # (default) (requires AWS creds + Checkov + DynamoDB) # contract -> resolver -> stack -> adapter -> terraform plan -> Checkov -> # confidence -> outbox # # Flags: -# --quiet suppress terraform/checkov streaming (output to log only) -# --decommission gate --destroy with D-070 two-step CR validation (requires ) +# --quiet suppress terraform/checkov streaming (output to log only) +# --decommission gate --destroy with D-070 two-step CR validation (requires ) +# --deploy-uptime deploy the uptime monitoring stack (separate state) +# --local run the headline E2E against the local emulating tier (D-092) +# --environment override the contract's environment at load time (D-088) +# --help, -h show all flags + a one-line description # # The contract file is a YAML file validated against schemas/contract.schema.json. # The resolver (core/contract_resolver.py) resolves it to a Target Stack @@ -59,6 +68,36 @@ CHANGE_REQUEST_ID="" ENVIRONMENT_OVERRIDE="" CONTRACT="" +# P15 (REQ-179): --help / -h prints all flags + a one-line description. +_print_help() { + cat <<'HELP' +Nova platform pipeline — run_platform.sh + +Usage: + run_platform.sh (full e2e with AWS) + run_platform.sh --check-only [contract.yml] (offline, no AWS) + run_platform.sh --plan-only (AWS plan only) + run_platform.sh --apply (AWS apply) + run_platform.sh --destroy (AWS destroy) + run_platform.sh --local [contract.yml] (local emulating tier) + run_platform.sh --decommission (gated teardown) + +Flags: + --check-only Offline validation (no AWS/Checkov/DynamoDB) — for CI + --plan-only AWS plan only (requires AWS creds, no Checkov/outbox) + --apply AWS apply: init/validate/plan/apply (HITL gate for qa/prod/dr) + --destroy AWS destroy: init/validate/destroy + --decommission Gate --destroy with D-070 two-step CR validation (requires ) + --local Run the headline E2E against the local emulating tier (D-092, no AWS) + --quiet Suppress terraform/checkov streaming (log only) + --deploy-uptime Deploy the uptime monitoring stack (separate state) + --environment Override the contract's environment at load time (D-088) + --help, -h Show this help + +The contract file is a YAML file validated against schemas/contract.schema.json. +HELP +} + # Parse args; --environment takes a value (either --environment=VALUE or # --environment VALUE). The contract / changeRequestId are the remaining # positional args. @@ -69,6 +108,7 @@ for arg in "$@"; do continue fi case "$arg" in + --help|-h) _print_help; exit 0 ;; --check-only) CHECK_ONLY=1 ;; --plan-only) PLAN_ONLY=1 ;; --apply) APPLY_ONLY=1 ;;