Sync eng/common directory with azure-sdk-tools for PR 2417 (#3176)

* Add logic for retrieving package infro from DevOps feed

* Add template for docwarden

* Remove Invoke-DevOpsAPI changes

* Update verify readme logic

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
This commit is contained in:
Azure SDK Bot 2021-12-09 17:37:19 -08:00 committed by GitHub
parent 8daec30172
commit 11e625596f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 4 deletions

View File

@ -0,0 +1,17 @@
parameters:
ScanPath: $(Build.SourcesDirectory)
RepoRoot: $(Build.SourcesDirectory)
SettingsPath: '$(Build.SourcesDirectory)/eng/.docsettings.yml'
DocWardenVersion : '0.7.2'
steps:
- task: PowerShell@2
displayName: "Verify Readmes"
inputs:
filePath: "eng/common/scripts/Verify-Readme.ps1"
arguments: >
-DocWardenVersion ${{ parameters.DocWardenVersion }}
-ScanPath ${{ parameters.ScanPath }}
-RepoRoot ${{ parameters.RepoRoot }}
-SettingsPath ${{ parameters.SettingsPath }}
pwsh: true

View File

@ -1,15 +1,24 @@
# Wrapper Script for Readme Verification
[CmdletBinding()]
param (
[string]$DocWardenVersion = "0.7.1",
[Parameter(Mandatory = $true)]
[string]$DocWardenVersion,
[Parameter(Mandatory = $true)]
[string]$ScanPath,
[string]$RepoRoot,
[Parameter(Mandatory = $true)]
[string]$SettingsPath
)
pip install setuptools wheel --quiet
pip install doc-warden==$DocWardenVersion --quiet
ward scan -d $ScanPath -c $SettingsPath
if ($RepoRoot)
{
ward scan -d $ScanPath -u $RepoRoot -c $SettingsPath
}
else
{
ward scan -d $ScanPath -c $SettingsPath
}