GloriousFlywheel

Pipeline Overview

The upstream attic-iac CI/CD pipeline is structured around five sequential stages that take changes from validation through to production deployment.

Stages

1. Validate

Static checks that run before any build or deploy work begins.

2. Build

Produces the artifacts needed by later stages.

3. Plan

Generates OpenTofu execution plans for each infrastructure stack.

Each plan is saved as an artifact and passed to the deploy stage.

4. Deploy

Applies the saved plans from the previous stage.

5. Verify

Post-deployment health checks confirm services are running.

Drift Detection

A scheduled pipeline runs independently of code changes. It executes tofu plan -detailed-exitcode against each stack. A non-zero exit code indicates configuration drift (manual changes made outside of tofu), which triggers an alert.

Pipeline Diagram

graph LR
    V[Validate] --> B[Build]
    B --> P[Plan]
    P --> D[Deploy]
    D --> VR[Verify]
    S[Schedule] -->|"drift detection"| VR