-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync eng/common directory with azure-sdk-tools for PR 8754 (#30677)
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#8754 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: Scott Beddall <[email protected]> Co-authored-by: Scott Beddall <[email protected]> Co-authored-by: Wes Haggard <[email protected]>
- Loading branch information
1 parent
ddbf627
commit 1ea51f7
Showing
7 changed files
with
130 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
eng/common/pipelines/templates/steps/verify-changelogs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
parameters: | ||
- name: PackagePropertiesFolder | ||
type: string | ||
- name: Condition | ||
type: string | ||
default: succeeded() | ||
|
||
steps: | ||
- task: Powershell@2 | ||
inputs: | ||
filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLogs.ps1 | ||
arguments: > | ||
-PackagePropertiesFolder '${{ parameters.PackagePropertiesFolder }}' | ||
pwsh: true | ||
displayName: Verify ChangeLogEntries | ||
condition: ${{ parameters.Condition }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
parameters: | ||
- name: PackagePropertiesFolder | ||
type: string | ||
- name: RepoRoot | ||
type: string | ||
default: $(Build.SourcesDirectory) | ||
- name: SettingsPath | ||
type: string | ||
default: '$(Build.SourcesDirectory)/eng/.docsettings.yml' | ||
- name: DocWardenVersion | ||
type: string | ||
default: '' | ||
- name: Condition | ||
type: string | ||
default: succeeded() | ||
|
||
steps: | ||
- pwsh: | | ||
$packageProperties = Get-ChildItem -Recurse "${{ parameters.PackagePropertiesFolder }}" *.json | ||
$paths = @() | ||
foreach($propertiesFile in $packageProperties) { | ||
$PackageProp = Get-Content -Path $propertiesFile | ConvertFrom-Json | ||
$paths += (Join-Path "$(Build.SourcesDirectory)" $PackageProp.DirectoryPath) | ||
} | ||
$scanPaths = $paths -join "," | ||
Write-Host "##vso[task.setvariable variable=ScanPathArgument;]$scanPaths" | ||
displayName: Populate Scan Paths | ||
|
||
- task: PowerShell@2 | ||
displayName: "Verify Readmes" | ||
condition: ${{ parameters.Condition }} | ||
inputs: | ||
filePath: "eng/common/scripts/Verify-Readme.ps1" | ||
arguments: > | ||
-DocWardenVersion '${{ parameters.DocWardenVersion }}' | ||
-ScanPaths '$(ScanPathArgument)' | ||
-RepoRoot ${{ parameters.RepoRoot }} | ||
-SettingsPath ${{ parameters.SettingsPath }} | ||
pwsh: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Wrapper Script for ChangeLog Verification in a PR | ||
[CmdletBinding()] | ||
param ( | ||
[String]$PackagePropertiesFolder | ||
) | ||
Set-StrictMode -Version 3 | ||
|
||
. (Join-Path $PSScriptRoot common.ps1) | ||
|
||
# find which packages we need to confirm the changelog for | ||
$packageProperties = Get-ChildItem -Recurse "$PackagePropertiesFolder" *.json | ||
|
||
# grab the json file, then confirm the changelog entry for it | ||
$allPassing = $true | ||
foreach($propertiesFile in $packageProperties) { | ||
$PackageProp = Get-Content -Path $propertiesFile | ConvertFrom-Json | ||
|
||
$validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.ChangeLogPath -VersionString $PackageProp.Version -ForRelease $false | ||
|
||
if (-not $validChangeLog) { | ||
$allPassing = $false | ||
} | ||
} | ||
|
||
|
||
if (!$allPassing) | ||
{ | ||
exit 1 | ||
} | ||
|
||
exit 0 |