031887ec56
Contract surface redesign: - New top-level fields: id (3-6 char acronym → stack.name), name (full → stack.title), infrastructure (map keyed by module name, replaces module:) - Drop uses: field (dead reference; version pin lives in CI workflow uses: line) - Drop top-level module/inputs (now nested under infrastructure map) - Per-module optional version (defaults to latest published from registry) - Multi-module contracts: one file deploys N modules in one pipeline run, resource IDs namespaced with module name to avoid collisions - stack.schema.json: add optional title field for display name Rename: - pipelines/deploy.yaml → pipelines/contract.yml (declarative spec, not a pipeline) - pipelines/ci.yaml → pipelines/ci.yml - All 44 .yaml files → .yml repo-wide (contracts, module examples, kyverno policies) - .acdl/contract.yaml → .acdl/contract.yml Resolver (core/contract_resolver.py): - Rewrite resolve() to loop infrastructure map, default version to latest, merge module fragments into one stack with namespaced resource IDs - _latest_version() picks highest non-deprecated from registry - _namespace_resources() prefixes IDs + rewrites ref: expressions for multi-module - Single-module path: unprefixed IDs (backward compatible) Verification: - 494 tests pass (0 contract-shape failures) - Local E2E passes (contract → resolver → adapter → local ECS HTTP 200 → outbox) ---ci--- project: acdl phase: 57 milestone: v1.10.2 status: execute ---/ci---
76 lines
2.5 KiB
JSON
76 lines
2.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://acdl.cloudinit.dev/schemas/deploy-pipeline.schema.json",
|
|
"title": "ACDL Central Deployment Pipeline Contract",
|
|
"description": "Declarative contract for the ACDL deployment pipeline. Declares the stages that run when a consumer submits a contract: validate-contract, resolve-stack, terraform-plan, checkov, confidence, apply. The platform (scripts/run_platform.sh) implements these stages. This is the declarative pipeline spec; the executable workflow is .github/workflows/deploy.yml which invokes scripts/run_platform.sh.",
|
|
"type": "object",
|
|
"required": ["name", "triggers", "runner", "stages"],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Pipeline name."
|
|
},
|
|
"environment": {
|
|
"type": "string",
|
|
"enum": ["dev", "production"],
|
|
"description": "Declared environment. dev = autonomous; production = HITL gates."
|
|
},
|
|
"triggers": {
|
|
"type": "object",
|
|
"required": ["push", "pull_request"],
|
|
"properties": {
|
|
"push": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Branches that trigger the pipeline on push."
|
|
},
|
|
"pull_request": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Branches that trigger the pipeline on PR."
|
|
}
|
|
}
|
|
},
|
|
"runner": {
|
|
"type": "string",
|
|
"description": "Runner image (e.g. 'ubuntu-latest')."
|
|
},
|
|
"python_version": {
|
|
"type": "string",
|
|
"description": "Python version for setup-python action."
|
|
},
|
|
"stages": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {"$ref": "#/$defs/stage"}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"stage": {
|
|
"type": "object",
|
|
"required": ["name", "command", "required"],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Stage 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."
|
|
},
|
|
"install": {
|
|
"type": "string",
|
|
"description": "Optional: pip install command to run before the stage command."
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Optional: human-readable description of what this stage does."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |