File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -608,14 +608,10 @@ Push-Location $RepoRoot
608608try {
609609 $serverDetails = @ (Get-ServerDetails )
610610 $pathsToTest = @ (Get-PathsToTest )
611- $matrices = [ordered ]@ {}
612-
613- if ($pathsToTest.Count -gt 0 ) {
614- $matrices = Get-BuildMatrices $serverDetails
615- $matrices [' liveTestMatrix' ] = Get-TestMatrix $pathsToTest - TestType ' Live'
616- $matrices [' serverMatrix' ] = Get-ServerMatrix $serverDetails
617- }
618-
611+ $matrices = Get-BuildMatrices $serverDetails
612+ $matrices [' liveTestMatrix' ] = Get-TestMatrix $pathsToTest - TestType ' Live'
613+ $matrices [' serverMatrix' ] = Get-ServerMatrix $serverDetails
614+
619615 # spellchecker: ignore SOURCEVERSION
620616 $branch = $isPipelineRun ? (CheckVariable ' BUILD_SOURCEBRANCH' ) : (git rev- parse -- abbrev- ref HEAD)
621617 $commitSha = $isPipelineRun ? (CheckVariable ' BUILD_SOURCEVERSION' ) : (git rev- parse HEAD)
@@ -638,6 +634,13 @@ try {
638634
639635 $buildInfo | ConvertTo-Json - Depth 5 | Out-File - FilePath $OutputPath - Encoding utf8 - Force
640636
637+ # if path to test is empty, set all matrices to empty
638+ if (pathsToTest.Count -eq 0 ) {
639+ foreach ($key in $matrices.Keys ) {
640+ $matrices [$key ] = @ {}
641+ }
642+ }
643+
641644 if ($isPipelineRun ) {
642645 foreach ($key in $matrices.Keys ) {
643646 $matrixJson = $matrices [$key ] | ConvertTo-Json - Compress
You can’t perform that action at this time.
0 commit comments