From 9b44a9913bb6c47c38704c5d1459878fc1920ad8 Mon Sep 17 00:00:00 2001 From: Larry Osterman Date: Mon, 15 May 2023 13:47:39 -0700 Subject: [PATCH] Only check links in changed files (for PR builds) or the service directory (for release builds) (#4621) * Only check links in changed files (for PR builds) or the service directory (for release builds) * Fixed link detection for CheckLinkGuidance --- eng/pipelines/templates/jobs/archetype-sdk-client.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index c89a1bd42..bb425eae8 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -157,7 +157,11 @@ jobs: - template: /eng/common/pipelines/templates/steps/verify-links.yml parameters: - Directory: '' + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + Directory: '' + Urls: (eng/common/scripts/get-markdown-files-from-changed-files.ps1) + ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + Directory: sdk/${{ parameters.ServiceDirectory }} CheckLinkGuidance: $true - ${{ each artifact in parameters.Artifacts }}: