Skip to content

Commit f394ae8

Browse files
azure-sdkheaths
andauthored
Sync eng/common directory with azure-sdk-tools for PR 1559 (Azure#18064)
* 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 * Remove invalid 'telemetry' product slug Relates to Azure#17991 * Disable verify-samples template Opened Azure#18066 to track re-enabling it. Co-authored-by: Heath Stewart <heaths@microsoft.com>
1 parent 6fb418f commit f394ae8

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

eng/common/pipelines/templates/steps/verify-samples.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ parameters:
55
- name: ScriptDirectory
66
type: string
77
default: eng/common/scripts
8-
- name: Condition
9-
type: boolean
10-
default: succeeded()
118

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

eng/common/scripts/Test-SampleMetadata.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ process {
3131
}
3232

3333
[string[]] $content = $file | Get-Content
34-
if (!$content[0].StartsWith('---')) {
34+
if (!$content -or !$content[0].StartsWith('---')) {
3535
Write-Verbose "Skipping $($file.FullName): does not contain frontmatter"
3636
continue
3737
}
3838

39+
Write-Verbose "Checking $($file.FullName)"
40+
3941
# Reset metadata and create mutable collections.
4042
$products = [System.Collections.Generic.List[string]]::new()
4143

eng/pipelines/templates/steps/analyze.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ steps:
2323
ServiceName: ${{parameters.ServiceDirectory}}
2424
ForRelease: false
2525

26-
- template: /eng/common/pipelines/templates/steps/verify-samples.yml
27-
parameters:
28-
ServiceDirectory: ${{parameters.ServiceDirectory}}
26+
# - template: /eng/common/pipelines/templates/steps/verify-samples.yml
27+
# parameters:
28+
# ServiceDirectory: ${{parameters.ServiceDirectory}}
2929

3030
# Using --always-succeed so as not to block the build. Once package
3131
# target is based on data available per-package the --always-succeed should

sdk/core/azure-core-tracing-opentelemetry/samples/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ languages:
44
- python
55
products:
66
- azure
7-
- azure-core-tracing-opentelemetry
87
urlFragment: azure-core-tracing-opentelemetry-samples
98
---
109

0 commit comments

Comments
 (0)