Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 1555 (Azure#14883)
Browse files Browse the repository at this point in the history
* Verify samples during CIs

Replaces Azure/azure-sdk-for-python#17999 for use in all language repos.

* Move exit to proper scope

* Use verify-samples template

Co-authored-by: Heath Stewart <[email protected]>
  • Loading branch information
2 people authored and vindicatesociety committed Apr 26, 2021
1 parent acb7b8c commit f0901c0
Show file tree
Hide file tree
Showing 3 changed files with 552 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 f0901c0

Please sign in to comment.