Files
acdl/schemas/modules-lifecycle-pipeline.schema.json
T
Jon Chery 361fe600a9 feat(P61): L2 lifecycle pipeline — extend matrix + workflows + tests
Extend the modules-lifecycle pipeline with L2 composition modules
(static-assets, microservice) per REQ-128:

- pipelines/modules-lifecycle.yml: added l2-lifecycle-apply/modify/destroy
  stages + l2_modules matrix entry
- .gitea/workflows/modules-lifecycle.yml + .github/workflows/modules-lifecycle.yml:
  added l2-lifecycle job (byte-identical), matrix over [static-assets,
  microservice], needs ci-vpc-apply, has apply/modify/destroy steps.
  ci-vpc-destroy now needs both [lifecycle, l2-lifecycle].
- schemas/modules-lifecycle-pipeline.schema.json: added l2_modules to matrix
- scripts/run_l2_lifecycle_test.sh + run_l2_lifecycle_destroy.sh: L2 wrappers
  that set ACDL_REMOTE_STATE_KEY=spike/ci-vpc/terraform.tfstate so the
  microservice composition's terraform_remote_state reads from the CI VPC
- adapters/terraform/adapter.py: parameterized remote_state key via
  ACDL_REMOTE_STATE_KEY env var (default: platform/terraform.tfstate)
- modules/l2/static-assets/examples/complex.yml: fixed bucket_name to match
  simple (my-static-site) so terraform modifies in-place (adds CDN + WAF)
- modules/l2/microservice/examples/complex.yml: fixed bucket_name to match
  simple (my-microservice-demo), added desired_count:2 (modify variant)
- tests/test_pipeline_contract.py: 7 new L2 tests (l2 job exists, matrix
  lists both modules, apply/modify/destroy steps, needs ci-vpc-apply,
  ci-vpc-destroy needs both, contract matrix lists l2_modules)
- pipelines/README.md: updated stages for L2

Regression: 485 passed, 5 deselected. Gitea + GitHub workflows byte-identical.

---ci---
project: acdl
phase: P61
milestone: v1.11
status: execute
---/ci---
2026-07-28 20:17:27 +00:00

97 lines
3.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://acdl.cloudinit.dev/schemas/modules-lifecycle-pipeline.schema.json",
"title": "ACDL Modules Lifecycle Pipeline Contract",
"description": "Declarative contract for the modules-lifecycle pipeline. Matrix-runs each L1 module's examples/{simple,complex}.yml contracts through apply→modify→destroy against live AWS. Both Gitea Actions (.gitea/workflows/modules-lifecycle.yml) and GitHub Actions (.github/workflows/modules-lifecycle.yml) implement this contract byte-identically.",
"type": "object",
"required": ["name", "triggers", "runner", "python_version", "terraform_version", "stages", "matrix"],
"properties": {
"name": {
"type": "string",
"description": "Pipeline name (matches the workflow 'name:' field)."
},
"triggers": {
"type": "object",
"required": ["pull_request", "workflow_dispatch"],
"properties": {
"pull_request": {
"type": "array",
"items": {"type": "string"},
"description": "Branches that trigger the pipeline on PR."
},
"workflow_dispatch": {
"type": "array",
"items": {"type": "string"},
"description": "Allows manual dispatch (empty array = no params)."
}
}
},
"runner": {
"type": "string",
"description": "Runner image (e.g. 'ubuntu-latest')."
},
"python_version": {
"type": "string",
"description": "Python version for setup-python action."
},
"terraform_version": {
"type": "string",
"description": "Terraform version constraint (e.g. '1.9.*')."
},
"stages": {
"type": "array",
"minItems": 1,
"items": {"$ref": "#/$defs/stage"}
},
"matrix": {
"type": "object",
"required": ["modules"],
"properties": {
"modules": {
"type": "array",
"items": {"type": "string"},
"description": "L1 module names to test."
},
"vpc_dependent": {
"type": "array",
"items": {"type": "string"},
"description": "Modules that require the platform VPC prerequisite."
},
"independent": {
"type": "array",
"items": {"type": "string"},
"description": "Modules that run without the platform VPC."
},
"l2_modules": {
"type": "array",
"items": {"type": "string"},
"description": "L2 composition module names to test."
}
}
}
},
"$defs": {
"stage": {
"type": "object",
"required": ["name", "command", "required"],
"properties": {
"name": {
"type": "string",
"description": "Stage name (maps to the workflow job/step name)."
},
"command": {
"type": "string",
"description": "The shell command to run for this stage."
},
"required": {
"type": "boolean",
"description": "If true, a non-zero exit code fails the pipeline."
},
"description": {
"type": "string",
"description": "Optional: human-readable description of what this stage does."
}
}
}
}
}