Files
acdl/schemas/modules-lifecycle-pipeline.schema.json
T
Jon Chery 7ba72bf656 feat(P59): L1 module lifecycle pipeline — author workflows + schema + tests
EXECUTE stage. Authors the modules-lifecycle pipeline that matrix-tests
every L1 module's examples/{simple,complex}.yml contracts through
apply→modify→destroy against live AWS. No per-module Python.

New files:
- pipelines/modules-lifecycle.yml: declarative contract (5 stages:
  platform-vpc-apply, lifecycle-apply, lifecycle-modify, lifecycle-destroy,
  platform-vpc-destroy). Matrix over 12 L1 modules.
- .gitea/workflows/modules-lifecycle.yml + .github/workflows/modules-lifecycle.yml:
  byte-identical workflows. 3 jobs: platform-vpc-apply (prerequisite),
  lifecycle (matrix of 12 modules × apply/modify/destroy), platform-vpc-destroy
  (always runs, cleanup). Triggers: pull_request to main + workflow_dispatch.
- schemas/modules-lifecycle-pipeline.schema.json: schema for the new pipeline
  shape (extends pipeline.schema.json with workflow_dispatch + matrix).

Tests (tests/test_pipeline_contract.py):
- TestModulesLifecyclePipeline: 12 tests (schema valid, contract validates,
  byte-identical, workflow name, 3 jobs, triggers, matrix lists all 12 L1
  modules, apply/modify/destroy steps present, platform-vpc-destroy always runs).

pipelines/README.md: added modules-lifecycle to the pipeline table.

Regression: 479 passed, 0 skipped, 5 deselected (slow).

---ci---
project: acdl
phase: P59
milestone: v1.11
status: execute
---/ci---
2026-07-28 16:07:57 +00:00

92 lines
3.0 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."
}
}
}
},
"$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."
}
}
}
}
}