The Final Piece: How to Trigger PR Builds

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

You correctly removed the pr: block from your YAML. This is the best practice. PR builds should be controlled by Branch Policies in the Azure DevOps UI, as this is more secure and explicit.

If your PRs are not triggering, it's because this UI setting is missing:

  1. Go to Repos > Branches.
  2. Find your develop branch, click the ... menu, and select Branch policies.
  3. Under "Build Validation," click the + button.
  4. Select your main "Assembly Line" pipeline.
  5. Set the trigger to Automatic and the requirement to Required.
  6. Click Save and repeat for your main branch.

This policy, not your YAML, is now the "source of truth" for PR builds. Your Deploy stage's condition (ne(variables['Build.Reason'], 'PullRequest')) will automatically detect this is a "PullRequest" build and skip deployment.