From f55bcd840f9405808d0daa210933a425b584b95c Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Wed, 4 Nov 2020 15:45:50 -0800
Subject: [PATCH] Do not trigger CI builds for changes to doc files (#27484)

* Do not trigger CI builds for changes to doc files
- changes to these files cannot break the build!
- inspired by similar rules in the dotnet/runtime repo

also avoid starting the quarantined-pr pipeline for 2.1 and 3.1 PRs

* No Markdown file should trigger a PR build
---
 .azure/pipelines/ci.yml             | 24 +++++++++++++++++-
 .azure/pipelines/quarantined-pr.yml | 39 ++++++++++++++++++++++++++++-
 2 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml
index 4cdcb3979ac..e985fbdb47b 100644
--- a/.azure/pipelines/ci.yml
+++ b/.azure/pipelines/ci.yml
@@ -7,10 +7,21 @@ trigger:
   batch: true
   branches:
     include:
-    - blazor-wasm
     - master
     - release/*
     - internal/release/*
+  paths:
+    exclude:
+    - .github/*
+    - .vscode/*
+    # Exclude only a few specific Markdown files because some of them ship.
+    - docs/*
+    - CODE-OF-CONDUCT.md
+    - CONTRIBUTING.md
+    - LICENSE.TXT
+    - README.md
+    - SECURITY.md
+    # Do not ignore the THIRD-PARTY-NOTICES.TXT file because it ships.
 
 # Run PR validation on all branches
 pr:
@@ -18,6 +29,17 @@ pr:
   branches:
     include:
     - '*'
+  paths:
+    exclude:
+    - .github/*
+    - .vscode/*
+    - '**/*.md'
+    - CODE-OF-CONDUCT.md
+    - CONTRIBUTING.md
+    - LICENSE.TXT
+    - README.md
+    - SECURITY.md
+    - THIRD-PARTY-NOTICES.TXT
 
 variables:
 - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
diff --git a/.azure/pipelines/quarantined-pr.yml b/.azure/pipelines/quarantined-pr.yml
index d09ba4bc35a..3802241b70b 100644
--- a/.azure/pipelines/quarantined-pr.yml
+++ b/.azure/pipelines/quarantined-pr.yml
@@ -1,9 +1,46 @@
-# We want to run quarantined tests on master as well as on PRs
+#
+# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details on this file.
+#
+
+# Configure which branches trigger builds
+# We want to run quarantined tests on release/5.0 and master as well as on PRs
 trigger:
   batch: true
   branches:
     include:
     - master
+    - release/5.0
+  paths:
+    exclude:
+    - .github/*
+    - .vscode/*
+    # Exclude only a few specific Markdown files because some of them ship.
+    - docs/*
+    - CODE-OF-CONDUCT.md
+    - CONTRIBUTING.md
+    - LICENSE.TXT
+    - README.md
+    - SECURITY.md
+    # Do not ignore the THIRD-PARTY-NOTICES.TXT file because it ships.
+
+# Run PR validation on branches that include Helix tests
+pr:
+  autoCancel: true
+  branches:
+    include:
+    - release/5.0
+    - master
+  paths:
+    exclude:
+    - .github/*
+    - .vscode/*
+    - '**/*.md'
+    - CODE-OF-CONDUCT.md
+    - CONTRIBUTING.md
+    - LICENSE.TXT
+    - README.md
+    - SECURITY.md
+    - THIRD-PARTY-NOTICES.TXT
 
 schedules:
 - cron: "0 */4 * * *"
-- 
GitLab