Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ steps:
inputs:
filePath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIReview.ps1
arguments: >
-PackageInfoFiles ('${{ convertToJson(parameters.PackageInfoFiles) }}' | ConvertFrom-Json -NoEnumerate)
-PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}')
-ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name)
-ArtifactPath '${{parameters.ArtifactPath}}'
-ArtifactName ${{ parameters.ArtifactName }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ steps:
-BuildDefinition $(System.CollectionUri)$(System.TeamProject)/_build?definitionId=$(System.DefinitionId) `
-PipelineUrl $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId) `
-IsReleaseBuild $$(SetAsReleaseBuild) `
-PackageInfoFiles ('${{ convertToJson(parameters.PackageInfoFiles) }}' | ConvertFrom-Json -NoEnumerate)
-PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}')
workingDirectory: $(Pipeline.Workspace)
displayName: Validate packages and update work items
continueOnError: true
Expand Down
5 changes: 3 additions & 2 deletions eng/common/scripts/Create-APIReview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ elseif ($ArtifactList -and $ArtifactList.Count -gt 0) {
elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0) {
# Lowest Priority: Direct PackageInfoFiles (new method)
Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files"
$ProcessedPackageInfoFiles = $PackageInfoFiles # Use as-is
# Filter out empty strings or whitespace-only entries
$ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }
}
else {
Write-Error "No package information provided. Please provide either 'PackageName', 'ArtifactList', or 'PackageInfoFiles' parameters."
Expand All @@ -382,7 +383,7 @@ else {

# Validate that we have package info files to process
if (-not $ProcessedPackageInfoFiles -or $ProcessedPackageInfoFiles.Count -eq 0) {
Write-Error "No package info files found after processing parameters."
Write-Error "No package info files found after processing parameters. Or PackageInfoFiles parameter contains only empty or whitespace entries, please check the artifact settings."
exit 1
}

Expand Down
5 changes: 3 additions & 2 deletions eng/common/scripts/Validate-All-Packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,13 @@ elseif ($PackageInfoFiles -and $PackageInfoFiles.Count -gt 0)
{
# Direct PackageInfoFiles (new method)
Write-Host "Using PackageInfoFiles parameter with $($PackageInfoFiles.Count) files"
$ProcessedPackageInfoFiles = $PackageInfoFiles
# Filter out empty strings or whitespace-only entries
$ProcessedPackageInfoFiles = $PackageInfoFiles | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }
}

# Validate that we have package info files to process
if (-not $ProcessedPackageInfoFiles -or $ProcessedPackageInfoFiles.Count -eq 0) {
Write-Error "No package info files found after processing parameters."
Write-Error "No package info files found after processing parameters. Or PackageInfoFiles parameter contains only empty or whitespace entries, please check the artifact settings."
exit 1
}

Expand Down