Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
remove useless ForEach-Object { [PSCustomObject] }
  • Loading branch information
scbedd committed Oct 30, 2024
commit e3b7f52b680b0cbf6a290de5e0332fed940e4191
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ parameters:
- name: PRMatrixSetting
type: string
default: 'ArtifactPackageNames'
# Mappings to OS name required at template compile time by 1es pipeline templates
- name: Pools
type: object
default:
Expand Down Expand Up @@ -124,7 +125,6 @@ jobs:
# Not currently not hardcoded, so not doing the needful and populating this folder before we hit this step will result in generation errors.
- ${{ else }}:
- ${{ each pool in parameters.Pools }}:

- pwsh: |
# dump the conglomerated CI matrix
'${{ convertToJson(parameters.MatrixConfigs) }}' | Set-Content matrix.json
Expand Down
6 changes: 2 additions & 4 deletions eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ if (!(Test-Path $PRMatrixFile)) {

Write-Host "Generating PR job matrix for $PackagePropertiesFolder"

$configs = Get-Content -Raw $PRMatrixFile | ConvertFrom-Json | ForEach-Object { [PSCustomObject]$_ }
$configs = Get-Content -Raw $PRMatrixFile | ConvertFrom-Json

# calculate general targeting information and create our batches prior to generating any matrix
# this prototype doesn't handle direct and indirect, it just batches for simplicity of the proto
$packageProperties = Get-ChildItem -Recurse "$PackagePropertiesFolder" *.json `
| ForEach-Object { Get-Content -Path $_.FullName | ConvertFrom-Json } `
| ForEach-Object { [PSCustomObject]$_ }
| ForEach-Object { Get-Content -Path $_.FullName | ConvertFrom-Json }

# set default matrix config for each package if there isn't an override
$packageProperties | ForEach-Object {
Expand Down