Volume 3 — Integration Automation and CI Orchestration — contents
  1. Foreword
  2. Chapter 1 — What Integration-Level Automation Is
  3. Chapter 2 — Why Most CI YAML Grows Monstrously
  4. Chapter 3 — The Contract: Six Typed Configuration Categories
  5. Chapter 4 — Specifications
  6. Chapter 5 — Landscape Files
  7. Chapter 6 — Topology Files
  8. Chapter 7 — Runtime Files vs Environment Variables
  9. Chapter 8 — Data Profiles
  10. Chapter 9 — Credential Vocabularies
  11. Chapter 10 — Credential Resolution
  12. Chapter 11 — Credentials in Flight
  13. Chapter 12 — Credentials Across Environments
  14. Chapter 13 — The Development-Environment Ladder
  15. Chapter 14 — Configuration Profiles as a Discipline
  16. Chapter 15 — The Local-Dev Tax and How Typed Configs Cancel It
  17. Chapter 16 — Reproducing CI Failures Locally
  18. Chapter 17 — Profile Promotion
  19. Chapter 18 — The taskplus Task Model
  20. Chapter 19 — Built-in Task Types
  21. Chapter 20 — Workflow YAML Grammar
  22. Chapter 21 — Passing Information to Jobs
  23. Chapter 22 — Flow Control as Data
  24. Chapter 23 — Extending the Task Model
  25. Chapter 24 — Wiring to a Real CI Vendor
  26. Chapter 25 — Bridges to Other Layers
  27. Chapter 26 — Case Study: Porting a Real Pipeline
  28. Chapter 27 — Where This Approach Is Not the Right Fit

Chapter 1 — What Integration-Level Automation Is

Most CI failures are not test failures. Most CI failures are environment failures, configuration failures, or coordination failures. The discipline that separates the three is integration automation.

A pipeline run is conventionally drawn as a stack of layers:

┌─────────────────────────────────────────────────────┐
│  CI provider (GitLab CI / GitHub Actions / Jenkins) │
└─────────────────────────────────────────────────────┘
                        │
                        ▼
┌─────────────────────────────────────────────────────┐
│  Orchestration                                      │  ← integration
│   "what high-level steps run, in what order,        │     automation
│    with what fallbacks?"                            │
└─────────────────────────────────────────────────────┘
                        │
                        ▼
┌─────────────────────────────────────────────────────┐
│  Jobs                                               │
│   "given step N is 'run tests', execute the         │
│    test suite (possibly across N hosts)."           │
└─────────────────────────────────────────────────────┘
                        │
                        ▼
┌─────────────────────────────────────────────────────┐
│  Tasks                                              │
│   individual tests, sysman feature calls,           │
│   interop ops, the things the jobs are made of      │
└─────────────────────────────────────────────────────┘

This chapter is about the second layer. Most teams conflate it with the first or the third — they put orchestration logic into vendor YAML, or they put orchestration logic into job code as conditional branches keyed off environment variables. Both choices have predictable failure modes. Both choices are how the fifty-line YAML grows to six hundred lines.

What "integration-level" means

Three jobs to be done sit at the orchestration layer:

  1. Sequencing. Which steps run, in what order, with what parallelism, with what fallback when one fails.
  2. Parameterisation. Which configuration is in scope for this run — which landscape, which runtime profile, which credential set, which data profiles. This is not "set forty environment variables"; this is "select named typed configurations."
  3. Coordination. How information flows between steps — the output of step N informing the input of step N+1; the artifacts of build informing the inputs of test; the results of test informing the deploy gate.

A well-built orchestration layer has clean expression of all three. A typical CI YAML expresses (1) clearly, (2) badly, and (3) by accident — the accidental expression being string-substitution into shell commands of values that came from environment variables that were exported by an earlier step that nobody remembers anymore.

What "integration-level" doesn't mean

Three things that are not integration-level automation, despite often being conflated with it:

  • Build automation. Compiling code, linking artifacts, packaging containers — these are tasks an orchestration may invoke, but they are not orchestration. A build script is a single step in a larger flow. When the build script tries to also be the orchestration, the Makefile is fifteen hundred lines and contains a function called is_running_in_ci.

  • Job execution. Running a test suite, running a deployment, running a sysman feature against a fleet — these are jobs. Jobs may run on multiple hosts; jobs may have internal sequencing of their own (Volume 2 on distributed automation is about exactly this). But a job is invoked by an orchestration; it is not an orchestration.

    A point of vocabulary worth pinning down here: the test job hierarchy in Volume 2 (TestJob → InteropLibraryTestJob → DistributedTestJob) and the orchestration job class (OrchestrationJob in codecraftai-landscaping/source/.../orchestrationjob.py:34) are separate hierarchies. OrchestrationJob inherits from ContextUser, not from TestJob. This volume treats orchestration jobs; Volume 2 treats test jobs. They meet at the bridge tasks of chapter 25 and not before.

  • Provisioning. Creating cloud resources, allocating containers, setting up databases — these are resources an orchestration consumes, expressed declaratively as Specifications (chapter 4). When a CI YAML contains forty lines of aws ec2 create-instance shell, those lines are misplaced; the orchestration should consume a resource by name, not by recipe.

The discipline of integration automation is to keep these three out of the orchestration layer. The orchestration says "this Specification must be live" or "run this Job" or "publish this artifact." It does not contain the recipe for any of the three.

Why this matters

Three concrete consequences flow from getting the layer separation right:

Pipelines become readable

A workflow that invokes a Job by name (rather than inlining seventy lines of shell to do the Job's work) is short. Short pipelines fit in code review; long pipelines do not. Pipelines that fit in code review get reviewed; pipelines that do not, do not. The first place discipline pays off is in the simple act of reading what the pipeline does on a Tuesday afternoon when something has gone wrong.

Pipelines become portable

A workflow expressed in codecraftai-taskplus's YAML is identical whether it runs on GitLab CI, GitHub Actions, Jenkins, or a developer's laptop. The CI vendor's YAML shrinks to a trigger and a runner image; everything else moves into the portable workflow. The portable workflow can be checked into the same repo as the code; it can be versioned with the code; it can be diffed; it can be tested in isolation.

Pipelines become debuggable

When a pipeline fails, the question "what configuration was in scope when it failed?" has an answer. The answer is the names of the typed configurations the orchestration selected: landscape staging-east, runtime verbose, credentials ci-runner. Those are typed objects with schemas; they are not the union of forty environment variables exported in unknowable order. An engineer reproducing the failure locally selects the same names. This is the subject of Part IV.

The shape of this volume

The volume has six parts. This chapter — and the next two — present the discipline. Part II names the six configuration categories and introduces each. Part III is the credentials chapter (which is a thicker subject than the other five categories combined and earns its own part). Part IV is the local-dev → CI → staging → prod story — how the discipline pays off in real workflows. Part V is the implementation in codecraftai-taskplus. Part VI is the case study and the wiring to real CI vendors.

A reader who learns nothing else from this volume should leave with this: the orchestration layer is not the place for environment variables. Environment variables are the symptom of a missing configuration category. Every time you find yourself reaching for an export FOO=bar in a pipeline, ask which of the six categories the value belongs in — and then put it there instead.

Summary

  • Integration-level automation is the orchestration layer between the CI provider and the jobs that do work.
  • It has three jobs: sequencing, parameterisation, coordination.
  • Most teams conflate it with build automation, job execution, or provisioning. All three conflations are how pipelines grow unmanageably.
  • The discipline of this volume is to keep the orchestration layer small and to express its parameterisation as named typed configurations rather than as environment variables.
  • The six configuration categories — Specifications, Landscapes, Topologies, Runtimes, Credentials, Data Profiles — are introduced in Part II.