Skip to content

Commit

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

Replaces Azure#17999 for use in all language repos.

* Move exit to proper scope

* Use verify-samples template

Co-authored-by: Heath Stewart <heaths@microsoft.com>
  • Loading branch information
azure-sdk and heaths authored Apr 15, 2021
1 parent 2be0cad commit b1ebc32
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 b1ebc32

Please sign in to comment.