File: verify-links.yml

package info (click to toggle)
golang-github-azure-azure-sdk-for-go 68.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 556,256 kB
  • sloc: javascript: 196; sh: 96; makefile: 7
file content (31 lines) | stat: -rw-r--r-- 1,585 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
parameters:
  Directory: 'not-specified'
  IgnoreLinksFile: '$(Build.SourcesDirectory)/eng/ignore-links.txt'
  WorkingDirectory: '$(System.DefaultWorkingDirectory)'
  ScriptDirectory: 'eng/common/scripts'
  Recursive: $false
  CheckLinkGuidance: $true
  Urls: '(Get-ChildItem -Path ./ -Recurse -Include *.md)'
  BranchReplaceRegex: "^(${env:SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI}/(?:blob|tree)/)$(DefaultBranch)(/.*)$"
  BranchReplacementName: "${env:SYSTEM_PULLREQUEST_SOURCECOMMITID}"
  Condition: succeeded() # If you want to run on failure for the link checker, set it to `Condition: succeededOrFailed()`.

steps:
  - template: /eng/common/pipelines/templates/steps/set-default-branch.yml
  - task: PowerShell@2
    displayName: Link verification check
    condition: ${{ parameters.Condition }}
    inputs:
      pwsh: true
      workingDirectory: '${{ parameters.WorkingDirectory }}/${{ parameters.Directory }}'
      filePath: ${{ parameters.ScriptDirectory }}/Verify-Links.ps1
      arguments: >
        -urls ${{ parameters.Urls }}
        -rootUrl "file://${{ parameters.WorkingDirectory }}/${{ parameters.Directory }}"
        -recursive: ${{ parameters.Recursive }}
        -ignoreLinksFile ${{ parameters.IgnoreLinksFile }}
        -branchReplaceRegex "${{ parameters.BranchReplaceRegex }}"
        -branchReplacementName ${{ parameters.BranchReplacementName }}
        -devOpsLogging: $true
        -checkLinkGuidance: ${{ parameters.CheckLinkGuidance }}
        -inputCacheFile "https://azuresdkartifacts.blob.core.windows.net/verify-links-cache/verify-links-cache.txt"