azure-sdk-for-cpp/eng/common/pipelines/templates/steps/verify-samples.yml
Azure SDK Bot 6b50feb0d4
Sync eng/common directory with azure-sdk-tools for PR 1559 (#2123)
* Handle empty files in Test-SampleMetadata

Relates to Azure/azure-sdk-for-java#20684

* Remove condition from verify-samples

* Use forward slash in path

* Fix directory typo

Co-authored-by: Heath Stewart <heaths@microsoft.com>
2021-04-14 22:37:40 -07:00

16 lines
588 B
YAML

parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: ScriptDirectory
type: string
default: eng/common/scripts
steps:
- pwsh: |
# If the last path segment is an absolute path it will be used entirely.
$root = [System.IO.Path]::Combine('$(Build.SourcesDirectory)', 'sdk', '${{ parameters.ServiceDirectory }}')
Get-ChildItem $root -Filter *.md -Recurse | ${{ parameters.ScriptDirectory }}/Test-SampleMetadata.ps1 -AllowParentProducts
displayName: Verify sample metadata
workingDirectory: $(Build.SourcesDirectory)