Architecture as Code · Module 2 · Architecture Platform

Automation, DevOps and CI/CD for Architecture as Code

The lesson shows how CI/CD pipelines make the whole architecture something that is checked on every change. It covers the division of automation responsibilities between Architecture as Code and Infrastructure as Code, pipeline design for regulated organisations including GDPR Article 25, the parallel tracks of an architecture pipeline, the four validation layers, progressive deployment strategies, environment promotion with evidence, and maintainability telemetry.

Lesson 6 of 31Chapter 590 minutes

Read the chapterThe whitepaperThe slides

All courses / Architecture as Code / Module 2 / Chapter 5

Learning objectives

After the lesson the participant can:

Key concepts

Fail-fast feedback and progressive validation
Errors are detected as early as possible through multilayer validation: syntax and static analysis, security and compliance scanning, cost estimation and budget validation, and policy validation, all before any infrastructure reaches production.
Architecture pipeline tracks
An Architecture as Code pipeline runs parallel tracks that converge at decision points: application architecture, data architecture, infrastructure architecture, security architecture and governance.
Data protection by design in the pipeline
The chapter reads GDPR Article 25 as requiring pipelines to validate data protection automatically: scanning for personal data patterns, enforcing encryption by default, validating data residency and generating an audit trail for every change.
Evidence bundle
The change set, policy reports and integration-test telemetry attached to each promotion, so that reviewers can confirm architectural parity without reconstructing the run. Bundles are archived for internal audit and retrospectives.
Maintainability telemetry
Signals such as the pipeline stability index, mean time to recovery for IaC rollbacks, policy breach density and architecture drift diff count, combined on dashboards with the five DORA software delivery metrics.

Interactive exercises

Do them here and get feedback at once. Choose a card and then where it belongs, or drag it.

Interactive exercise 1 · Sort

Tools and findings by validation layer

Sort each tool or finding into the validation layer of fail-fast feedback where the chapter's table places it.

Interactive exercise 2 · Scenario

A hotfix during promotion

Read the situation and choose what the chapter's reasoning leads to. Each choice gives feedback.

Teaching plan

15 minTeacher presents the automation responsibilities table and the four principles for automating Architecture as Code, with the history from pets to cattle.
15 minWalk through the regulated pipeline: Article 25, data discovery and classification, automated compliance validation and audit-trail generation.
15 minTeacher explains the validation layers, the three deployment strategies and the promotion ladder with its evidence table.
35 minExercise in groups: design a promotion ladder and a telemetry panel for one system, then present it to another group for challenge.
10 minClose on the balance between automation and human oversight for production deployments and compliance-critical changes.

Discussion

  1. The chapter says approvals should be configured on the protected environment rather than in the pipeline definition. What risk does this remove, and who should administer those resources in your organisation?
  2. Which of the three deployment strategies fits your most critical system, and what would have to be automated before you could use it?
  3. What does it mean to treat automation debt with the same urgency as a production outage?

Written exercise

Exercise · 35 minutes

Design a promotion ladder with evidence

Take one system in your own organisation that handles personal data. Design its promotion ladder for development, staging and production. For each environment state the mandatory evidence and the automated enforcement, following the pattern of the chapter's table. Place the three test categories (unit, integration, compliance and resilience) as distinct jobs and say what each job blocks. Decide where the four validation layers run. Then choose three maintainability signals from the chapter, define how each is calculated for your system, and set one threshold-driven alert, for example on the pipeline stability index.

Deliverable: A promotion table for three environments with evidence and enforcement, a placement of test jobs and validation layers, and three telemetry signals with one alert threshold.

Self-test

Choose an answer to see whether it is right, or open the answer below each question.

  1. Which GDPR article does the chapter cite for data protection by design and by default as a requirement on pipeline design?

    Show the answer

    C. Article 25
    The chapter attributes data protection by design and by default to Article 25 and translates it into automated scanning, data-residency validation and audit-trail generation in the pipeline.

  2. According to the chapter's promotion table, what must be present before the traffic switch executes in production?

    Show the answer

    A. Explicit architect approval plus an uploaded policy-as-code attestation
    For production, release gates require explicit architect approval plus a policy-as-code attestation uploaded by the pipeline before the traffic switch executes.

  3. How is policy breach density calculated in the chapter?

    Show the answer

    D. Failing policy checks divided by total runs in each environment
    Policy breach density is the number of failing policy checks divided by total runs in each environment. The other options describe the drift diff count, the rollback recovery time and the stability index.