d5bae868a4
core/env.py dual-read helper (D-108); 21 ACDL_*→NOVA_* env vars migrated across core/scripts/adapters/tests/workflows + .env/.env.secrets (key rename, values stay). G-106 binding: run_platform.sh:288-289 + regression_verify.py:309-312 dual-read (NOVA first, ACDL fallback). G-108 binding: Gitea NOVA_* secrets created via API + workflow secrets: refs updated (deploy.yml + modules-lifecycle.yml, .gitea + .github). acdl_tagging.py→nova_tagging.py (D-109 warn mode, nova:* enforced). .acdl/→.nova/ consumer path (resolver + deploy workflow + schema + tests + docs). Test fixtures updated; pytest + run_ci.sh PASS. ---ci--- project: acdl phase: 2 milestone: v1.15 status: execute ---/ci---
48 lines
2.2 KiB
Bash
Executable File
48 lines
2.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# scripts/run_l2_lifecycle_test.sh — run a single L2 module lifecycle apply/modify.
|
|
#
|
|
# Usage: run_l2_lifecycle_test.sh <module> <example>
|
|
#
|
|
# Wraps run_platform.sh for L2 composition modules in the modules-lifecycle
|
|
# pipeline. Sets NOVA_REMOTE_STATE_KEY (ACDL_REMOTE_STATE_KEY fallback until
|
|
# P5) to point to the CI VPC state so the microservice composition's
|
|
# terraform_remote_state data source reads from the short-lived CI VPC
|
|
# (not the long-lived platform VPC).
|
|
#
|
|
# NOTE: unlike the L1 scripts (run_lifecycle_test.sh), the L2 path does NOT
|
|
# take a ci-vpc-outputs.json argument. L2 compositions reference the platform
|
|
# VPC via terraform_remote_state (a data source), not by injecting VPC
|
|
# outputs into the contract. The NOVA_REMOTE_STATE_KEY env var points the
|
|
# data source at the correct CI VPC state key. The workflow passes 3
|
|
# positional args for parity with the L1 matrix, but $3 is accepted-but-
|
|
# ignored here (documented, not a bug).
|
|
#
|
|
# Lifecycle mode (REQ-134): NOVA_LIFECYCLE_MODE (dual-read NOVA_* preferred,
|
|
# ACDL_* fallback until P5) default "plan" runs
|
|
# `run_platform.sh --plan-only` (fast, no AWS mutation). Set to "full" for
|
|
# the real `--apply` against live AWS.
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT"
|
|
|
|
MODULE="$1"
|
|
EXAMPLE="$2" # simple or complex
|
|
|
|
# Lifecycle mode: "plan" (default, fast) or "full" (real apply against AWS).
|
|
# Dual-read: NOVA_* preferred, ACDL_* fallback (removed in P5).
|
|
LIFECYCLE_MODE="${NOVA_LIFECYCLE_MODE:-${ACDL_LIFECYCLE_MODE:-plan}}"
|
|
|
|
CONTRACT="modules/l2/${MODULE}/examples/${EXAMPLE}.yml"
|
|
|
|
# Point terraform_remote_state to the CI VPC state (not the platform VPC).
|
|
# Set both NOVA_* (preferred by the dual-read helper) and ACDL_* (legacy
|
|
# fallback) so any unmigrated reader finds the key until P5.
|
|
export NOVA_REMOTE_STATE_KEY="spike/ci-vpc/terraform.tfstate"
|
|
export ACDL_REMOTE_STATE_KEY="spike/ci-vpc/terraform.tfstate" # legacy fallback, removed in P5
|
|
|
|
# Run the platform lifecycle command (plan-only by default; full = apply).
|
|
if [ "$LIFECYCLE_MODE" = "full" ]; then
|
|
bash scripts/run_platform.sh --apply "$CONTRACT"
|
|
else
|
|
bash scripts/run_platform.sh --plan-only "$CONTRACT"
|
|
fi |