Skip to content

DR-012: Layered CI/CD Model with Dependency-Aware Orchestration

Status

  • [x] Accepted
  • [ ] Proposed
  • [ ] Rejected
  • [ ] Deprecated
  • [ ] Superseded

Date: 2025-01-10


Context

21 modules with dependencies need coordinated CI/CD, dependency-aware build order, change detection, artifact caching, and evidence generation for compliance.

Problem: How to orchestrate CI/CD for multi-module monorepo with dependencies?


Decision

Layered CI/CD model with 7-stage pipeline, dependency-aware orchestration, and reusable workflow templates.

7-Stage Pipeline:

  1. Checkout and setup
  2. Dependency resolution
  3. Build
  4. Test
  5. Security scans
  6. Evidence generation
  7. Artifact upload

Key Capabilities:

  • Per-module workflows (ci-eac-commands.yaml, ci-r2r-cli.yaml)
  • Reusable template (_module-ci.yaml)
  • Change detection (file ownership → affected modules)
  • Dependency-aware execution (build order, parallel layers)
  • Artifact caching and resolution
  • Evidence generation (test results, security scans, SBOM)

Release Orchestration:

  • Multi-module release coordination
  • Dependency-aware release order
  • Release bundle aggregation (r2r-eac-bundle)

Commands for Orchestration:

  • get-changed-modules - Detect affected modules
  • get-execution-order - Determine build order
  • get-ci-dispatch-layers - Parallel execution layers
  • pipeline-run - Execute CI respecting dependencies
  • release-execute-layers - Release in dependency order

Consequences

Positive: Efficient builds, parallel execution, artifact reuse, dependency safety, compliance automation, scalable CI/CD

Negative: Workflow complexity, orchestration overhead, GitHub Actions limitations, debugging difficulty


Alternatives Considered

  1. Single Monolithic Workflow: Rejected - slow, no parallelism, all-or-nothing execution
  2. Per-File Change Detection: Rejected - too granular, excessive builds, noise
  3. Jenkins/GitLab CI: Rejected - GitHub Actions integration benefits, ecosystem, familiarity


Tutorials | How-to Guides | Explanation | Reference

You are here: Reference — information-oriented technical descriptions of the system.