Files
acdl/pipelines/deploy.yaml
T
Jon Chery ca99241843
acdl-ci / Lint (push) Successful in 7s
acdl-ci / Test (push) Successful in 27s
acdl-ci / Platform check-only (offline) (push) Successful in 9s
verify(P28-38): code review — 1 P0 auto-fixed, 3 P1 fixes, 2 P1 flagged
---ci---
project: acdl
phase: 28-38
milestone: v1.8
status: verify
lessons:
  - P0 fix: pipelines/deploy.yaml stale terraform/spike paths updated to run_platform.sh
  - P1 fix: removed import sys from inside _emit_resource function body
  - P1 fix: removed unused cpu/memory vars in uptime emission
  - P1 fix: decommission consumerRepo now uses GITHUB_REPOSITORY env
---/ci---

P0: deploy.yaml 3 stage commands referenced removed terraform/spike dir.
P1 fixes: import sys, unused vars, consumerRepo env.
P1 flagged: uptime hardcoded subnet/sg, uses ref not bumped to v1.8.
P2 flagged: deploy-uptime flag standalone, pre-v1.8 READMEs missing NFRs.

Tests: 350 passed.
2026-07-22 22:30:49 +00:00

71 lines
2.7 KiB
YAML

# ACDL Central Deployment Pipeline Contract (v1.8)
#
# This is the single source of truth for the deployment pipeline. It
# declares the stages that run when a consumer submits a contract:
# validate-contract -> resolve-stack -> terraform-plan -> checkov ->
# confidence -> apply (dev only) -> publish-outputs -> deploy-uptime ->
# comment-outputs
#
# Decommission mode (mode: decommission) runs a different set of stages:
# validate-change-request -> disable-deletion-protection (HITL SRE) ->
# zero-counts (HITL SRE) -> confirm-decommission
#
# Consumers reference this pipeline via `uses: acdl/pipelines/deploy.yaml@v1`
# in their contract YAML. The platform (scripts/run_platform.sh) implements
# these stages.
#
# Validated against schemas/deploy-pipeline.schema.json.
name: acdl-deploy
environment: dev
triggers:
push: [main]
pull_request: [main]
runner: ubuntu-latest
python_version: "3.12"
stages:
- name: validate-contract
description: Validate the consumer contract against the contract schema
command: python3 -c "import jsonschema, yaml; jsonschema.validate(yaml.safe_load(open('contracts/static-assets.yaml')), json.load(open('schemas/contract.schema.json')))"
required: true
- name: resolve-stack
description: Resolve the contract to a Target Stack instance via the contract resolver
command: python3 core/contract_resolver.py contracts/static-assets.yaml /tmp/acdl-stack.json
required: true
- name: terraform-plan
description: Compile the stack to Terraform and run terraform plan
command: bash scripts/run_platform.sh --plan-only contracts/static-assets.yaml
required: true
- name: checkov
description: Run Checkov policy checks on the emitted Terraform
command: bash scripts/run_platform.sh --check-only
required: false
- name: confidence
description: Compute the confidence signal from policy + validation inputs
command: python3 core/confidence_signal.py /tmp/acdl-deploy-inputs.json dev
required: true
- name: apply
description: Apply the Terraform plan (dev environment only, autonomous per §10)
command: bash scripts/run_platform.sh --plan-only
required: false
- name: publish-outputs
description: Publish deploy outputs to SSM Parameter Store (SecureString) + GitHub PR comment
command: bash scripts/run_platform.sh
required: false
- name: deploy-uptime
description: Deploy uptime-kuma monitoring stack (separate terraform state) with endpoints from L2 outputs
command: bash scripts/run_platform.sh --deploy-uptime
required: false
- name: comment-outputs
description: Post a structured GitHub PR comment with human-readable deploy outputs
command: bash scripts/post_stage_comment.sh publish-outputs pass
required: false