Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 9945 (#24197)
Browse files Browse the repository at this point in the history
* allow skipping of batching during Create-PRJobMatrix
---------

Co-authored-by: Scott Beddall <[email protected]>
  • Loading branch information
azure-sdk and scbedd authored Mar 3, 2025
1 parent e694996 commit 569cb10
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ function GeneratePRMatrixForBatch {
}
}

if ($matrixConfig.PSObject.Properties['PRBatching']) {
# if we are doing a PR Batch, we need to just add the matrix items directly to the OverallResult
# as the users have explicitly disabled PR batching for this matrix.
if (!$matrixConfig.PRBatching) {
Write-Host "The matrix config $($matrixConfig.Path) with name $($matrixConfig.Name) has PRBatch set to false, the matrix members will be directly added without batching by $PRMatrixSetting."
$OverallResult += $matrixResults
continue
}
}

$packageBatches = Split-ArrayIntoBatches -InputArray $matrixBatch -BatchSize $BATCHSIZE

# we only need to modify the generated job name if there is more than one matrix config + batch
Expand Down

0 comments on commit 569cb10

Please sign in to comment.