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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
parameters:
- name: PackagePropertiesFolder
type: string
- name: RepoRoot
type: string
default: $(Build.SourcesDirectory)
- name: SettingsPath
type: string
default: '$(Build.SourcesDirectory)/eng/.docsettings.yml'
- name: DocWardenVersion
type: string
default: ''
- name: Condition
type: string
default: succeeded()
- name: IncludeIndirect
type: boolean
default: true
steps:
- pwsh: |
$includeIndirect = $${{ parameters.IncludeIndirect }}
$packageProperties = Get-ChildItem -Recurse "${{ parameters.PackagePropertiesFolder }}" *.json
$paths = @()
if (-not $includeIndirect) {
$packageProperties = $packageProperties | Where-Object { (Get-Content -Raw $_ | ConvertFrom-Json).IncludedForValidation -eq $false }
}
foreach($propertiesFile in $packageProperties) {
$PackageProp = Get-Content -Path $propertiesFile | ConvertFrom-Json
$paths += (Join-Path "$(Build.SourcesDirectory)" $PackageProp.DirectoryPath)
}
$scanPaths = $paths -join ","
Write-Host "##vso[task.setvariable variable=ScanPathArgument;]$scanPaths"
displayName: Populate Scan Paths
condition: ${{ parameters.Condition }}
- task: PowerShell@2
displayName: "Verify Readmes"
condition: ${{ parameters.Condition }}
inputs:
filePath: "eng/common/scripts/Verify-Readme.ps1"
arguments: >
-DocWardenVersion '${{ parameters.DocWardenVersion }}'
-ScanPaths '$(ScanPathArgument)'
-RepoRoot ${{ parameters.RepoRoot }}
-SettingsPath ${{ parameters.SettingsPath }}
pwsh: true
|