Core Concept 2: The "Factory & Assembly Line" (Why Two Pipelines)

27 October 2025
  1. The Factory & The Assembly Line: A High-Performance Drupal CI/CD Pipeline for Acquia and Azure DevOps
  2. Core Concept 1: The "Locked Box" (Why We Must Use Docker)
  3. Core Concept 2: The "Factory & Assembly Line" (Why Two Pipelines)
  4. Pipeline A: The "Factory" (image-builder-pipeline.yml)
  5. Pipeline B: The "Assembly Line" (Your Main Pipeline)
  6. The Build Stage (build.yml)
  7. The Deploy Stage (deploy.yml)
  8. The Final Piece: How to Trigger PR Builds
  9. Drupal Acquia Azure CI/CD pipeline - Conclusion

Building your "Locked Box" Docker image is slow (2-3 minutes). Running your application tests (like composer install) is fast (30 seconds).

The Problem: Building the image on every single code commit is a massive waste of time.

The Solution: We split the work into two separate pipelines:

  1. Pipeline A: The "Factory" (image-builder-pipeline.yml)
    • Job: To build the "Locked Box" (your php-build-odb image).
    • Runs: Very rarely (only when the Dockerfile changes).
    • Output: A compressed php-build-odb.tar.gz artifact.
  2. Pipeline B: The "Assembly Line" (azure-pipelines.yml)
    • Job: To test and deploy your Drupal code.
    • Runs: Constantly (on every commit and PR).
    • How it works: It skips the Docker build entirely. It just downloads the pre-built "Locked Box" from the Factory, loads it, and uses it to run your tests.

This architecture means your daily pipeline run is minutes faster, as it's only doing the work that's actually changed: testing your code.