diff --git a/eng/common/scripts/Helpers/PSModule-Helpers.ps1 b/eng/common/scripts/Helpers/PSModule-Helpers.ps1 index 1a2a0a9008..d9a5afaab1 100644 --- a/eng/common/scripts/Helpers/PSModule-Helpers.ps1 +++ b/eng/common/scripts/Helpers/PSModule-Helpers.ps1 @@ -22,9 +22,9 @@ function Update-PSModulePathForCI() $modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) }) # Add any "az_" paths from the agent which is the lastest set of azure modules - $AzModuleCachPath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator - if ($AzModuleCachPath -and $env.PSModulePath -notcontains $AzModuleCachPath) { - $modulePaths += $AzModuleCachPath + $AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator + if ($AzModuleCachePath -and $env:PSModulePath -notcontains $AzModuleCachePath) { + $modulePaths += $AzModuleCachePath } $env:PSModulePath = $modulePaths -join $moduleSeperator diff --git a/eng/common/scripts/job-matrix/Create-JobMatrix.ps1 b/eng/common/scripts/job-matrix/Create-JobMatrix.ps1 index 3f14b9a1d9..ebb102879a 100644 --- a/eng/common/scripts/job-matrix/Create-JobMatrix.ps1 +++ b/eng/common/scripts/job-matrix/Create-JobMatrix.ps1 @@ -17,6 +17,8 @@ param ( [Parameter(Mandatory=$False)][array] $NonSparseParameters ) +Set-PSDebug -Trace 1 + . $PSScriptRoot/job-matrix-functions.ps1 if (!(Test-Path $ConfigPath)) { @@ -39,6 +41,4 @@ $serialized = SerializePipelineMatrix $matrix Write-Output $serialized.pretty -if ($null -ne $env:SYSTEM_TEAMPROJECTID) { - Write-Output "##vso[task.setVariable variable=matrix;isOutput=true]$($serialized.compressed)" -} +Write-Host "##vso[task.setVariable variable=matrix;isOutput=true]$($serialized.compressed)" diff --git a/eng/common/scripts/job-matrix/job-matrix-functions.ps1 b/eng/common/scripts/job-matrix/job-matrix-functions.ps1 index dfc1fa44b0..e7d97f3129 100644 --- a/eng/common/scripts/job-matrix/job-matrix-functions.ps1 +++ b/eng/common/scripts/job-matrix/job-matrix-functions.ps1 @@ -169,7 +169,7 @@ function MatchesFilters([hashtable]$entry, [array]$filters) { # Default all regex checks to go against empty string when keys are missing. # This simplifies the filter syntax/interface to be regex only. $value = "" - if ($null -ne $entry -and $entry.parameters.Contains($key)) { + if ($null -ne $entry -and $entry.parameters?.Contains($key)) { $value = $entry.parameters[$key] } if ($value -notmatch $regex) { diff --git a/eng/common/scripts/stress-testing/generate-scenario-matrix.ps1 b/eng/common/scripts/stress-testing/generate-scenario-matrix.ps1 index 26507386a7..aba8be3451 100644 --- a/eng/common/scripts/stress-testing/generate-scenario-matrix.ps1 +++ b/eng/common/scripts/stress-testing/generate-scenario-matrix.ps1 @@ -24,6 +24,7 @@ function GenerateScenarioMatrix( -Filters $Filters ` -Replace $Replace ` -NonSparseParameters $NonSparseParameters + Write-Host $prettyMatrix $prettyMatrix = $prettyMatrix | ConvertFrom-Json $scenariosMatrix = @()