Skip to content

Commit

Permalink
Verify samples during CIs
Browse files Browse the repository at this point in the history
Replaces Azure/azure-sdk-for-python#17999 for use in all language repos.
  • Loading branch information
heaths authored and azure-sdk committed Apr 14, 2021
1 parent 60ee8be commit 5a06d93
Show file tree
Hide file tree
Showing 2 changed files with 542 additions and 0 deletions.
19 changes: 19 additions & 0 deletions eng/common/pipelines/templates/steps/verify-samples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: ScriptDirectory
type: string
default: eng/common/scripts
- name: Condition
type: boolean
default: succeeded()

steps:
- pwsh: |
# If the last path segment is an absolute path it will be used entirely.
$root = [System.IO.Path]::Combine('$(Build.SourcesDireectory)', 'sdk', '${{ parameters.ServiceDirectory }}')
Get-ChildItem $root -Filter *.md -Recurse | ${{ parameters.ScriptDirectory }}\Test-SampleMetadata.ps1 -AllowParentProducts
displayName: Verify sample metadata
workingDirectory: $(Build.SourcesDirectory)
condition: ${{ parameters.Condition }}
Loading

0 comments on commit 5a06d93

Please sign in to comment.