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---
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
# ACDL Central CI Pipeline Contract (v1.5)
|
|
#
|
|
# This is the single source of truth for the CI/CD pipeline. Both
|
|
# .gitea/workflows/ci.yml (Gitea Actions, dev) and
|
|
# .github/workflows/ci.yml (GitHub Actions, production) implement the
|
|
# stages, commands, triggers, and runner declared here.
|
|
# scripts/run_ci.sh mirrors the same stages for shell reproducibility.
|
|
#
|
|
# A test (tests/test_pipeline_contract.py) validates that both workflow
|
|
# YAMLs conform to this contract and that run_ci.sh runs the same commands.
|
|
#
|
|
# The contract does NOT replace workflow YAML syntax — it declares the
|
|
# *intent* that the forge-specific workflows implement. The workflow files
|
|
# use Gitea/GitHub Actions syntax (checkout, setup-python, run blocks);
|
|
# this contract declares what those blocks must contain.
|
|
#
|
|
# Validated against schemas/pipeline.schema.json.
|
|
|
|
name: acdl-ci
|
|
environment: dev
|
|
triggers:
|
|
push: [main]
|
|
pull_request: [main]
|
|
runner: ubuntu-latest
|
|
python_version: "3.12"
|
|
|
|
stages:
|
|
- name: lint
|
|
description: Compile all Python files (py_compile)
|
|
command: |
|
|
python3 -m py_compile \
|
|
core/confidence_signal.py \
|
|
core/outbox_writer.py \
|
|
core/contract_resolver.py \
|
|
core/lambda/contract_ingestor.py \
|
|
adapters/terraform/adapter.py \
|
|
adapters/terraform/policy/checkov_adapter.py \
|
|
scripts/push_consumer_image.py
|
|
required: true
|
|
|
|
- name: test
|
|
description: Run the pytest test suite offline
|
|
command: python3 -m pytest tests/ -v --tb=short
|
|
install: pip install -r requirements-test.txt
|
|
required: true
|
|
|
|
- name: check-only
|
|
description: Run the platform pipeline offline (no AWS/Checkov/DynamoDB)
|
|
command: bash scripts/run_platform.sh --check-only
|
|
install: pip install jsonschema pyyaml boto3
|
|
required: true |