## Phase 12: CI/CD & DevOps Consolidation

> **Superseded (2026-07-04):** the Kubernetes deployment stack this phase built
> (Helm charts, ArgoCD app-of-apps, kustomize overlays, the Helm-based
> `deploy.yml`) was replaced by the single-cloud **ECS Fargate** migration —
> compute is serverless Fargate, web/admin is AWS Amplify, GPU is RunPod, and
> there is no Kubernetes. `scripts/verify-phase-12-completion.mjs` now verifies
> the ECS deployment consolidation. See
> `V1/planning/IAC_CICD_AUDIT_2026-07-04.md`. The checklist below is retained as
> the historical record of the phase as originally delivered.

### 12.1 GitHub Actions Consolidation ✅

- [x] **12.1.1** Create unified .github/workflows/ at oshun root
- [x] **12.1.2** Create ci.yml for main CI pipeline
- [x] **12.1.3** Configure Nx affected commands for targeted builds
- [x] **12.1.4** Add caching for pnpm and Nx
- [x] **12.1.5** Create deploy.yml with environment stages
- [x] **12.1.6** Migrate lilith workflows
- [x] **12.1.7** Migrate yemaya workflows
- [x] **12.1.8** Create per-domain deployment jobs
- [x] **12.1.9** Add CodeQL security scanning
- [x] **12.1.10** Add accessibility testing
- [x] **12.1.11** Add performance benchmarking

### 12.2 Docker Consolidation

- [x] **12.2.1** Create docker/ directory at oshun root
- [x] **12.2.2** Create base Dockerfile for Node.js services
- [x] **12.2.3** Create base Dockerfile for web apps
- [x] **12.2.4** Create base Dockerfile for workers
- [x] **12.2.5** Migrate lilith Docker Compose files
- [x] **12.2.6** Migrate yemaya Docker Compose files
- [x] **12.2.7** Create unified docker-compose.yml for full stack
- [x] **12.2.8** Create docker-compose.dev.yml for development
- [x] **12.2.9** Create docker-compose.test.yml for testing
- [x] **12.2.10** Update GPU worker Dockerfiles for Isis

### 12.3 Kubernetes Consolidation

- [x] **12.3.1** Create infrastructure/kubernetes/ at oshun root
- [x] **12.3.2** Migrate lilith/deploy/kubernetes/
- [x] **12.3.3** Migrate yemaya/infrastructure/kubernetes/
- [x] **12.3.4** Create base manifests for each domain
- [x] **12.3.5** Create overlays for dev/staging/prod
- [x] **12.3.6** Add Kustomize configuration
- [x] **12.3.7** Update service names and namespaces

### 12.4 Helm Charts Consolidation

- [x] **12.4.1** Create infrastructure/helm/ at oshun root
- [x] **12.4.2** Migrate lilith/deploy/helm/
- [x] **12.4.3** Migrate yemaya/infrastructure/helm/
- [x] **12.4.4** Create Helm chart per domain
- [x] **12.4.5** Create umbrella chart for full deployment
- [x] **12.4.6** Update values files for each environment

### 12.5 Terraform Consolidation

- [x] **12.5.1** Create infrastructure/terraform/ at oshun root
- [x] **12.5.2** Migrate lilith/deploy/terraform/
- [x] **12.5.3** Migrate yemaya/infrastructure/terraform/
- [x] **12.5.4** Create modules for each cloud component
- [x] **12.5.5** Update state backend configuration
- [x] **12.5.6** Create workspace configuration per environment

### 12.6 ArgoCD Consolidation

- [x] **12.6.1** Migrate lilith/deploy/argocd/
- [x] **12.6.2** Create ApplicationSet for each domain
- [x] **12.6.3** Configure sync policies
- [x] **12.6.4** Add health checks

### 12.7 Observability Stack

- [x] **12.7.1** Consolidate Prometheus configurations
- [x] **12.7.2** Consolidate Grafana dashboards
- [x] **12.7.3** Create domain-specific dashboards
- [x] **12.7.4** Consolidate Elasticsearch/Kibana/Logstash
- [x] **12.7.5** Configure unified log aggregation
- [x] **12.7.6** Set up distributed tracing (Jaeger/Tempo)

### 12.8 Secrets Management

- [x] **12.8.1** Consolidate Vault configurations
- [x] **12.8.2** Create secret paths per domain
- [x] **12.8.3** Update Vault policies
- [x] **12.8.4** Configure secret injection for each service

---

