Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp authored and azure-sdk committed Nov 30, 2021
1 parent 8a74bc9 commit 26b1cb4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,17 @@ function ShouldMarkValueAsSecret([string]$serviceDirectoryPrefix, [string]$key,
$suffix1 = $key -replace $serviceDirectoryPrefix, ""
$suffix2 = $key -replace "AZURE_", ""
$variants = @($key, $suffix1, $suffix2)
Write-Host "non secret"
Write-Host "$serviceDirectoryPrefix"
Write-Host "$key $suffix1 $suffix2"
Write-Host "$($allowedValues | ConvertTo-Json)"
if ($variants | Where-Object { $logOutputNonSecret -contains $_ }) {
Write-Host "false for variant"
return $false
}

if ($allowedValues -contains $value) {
Write-Host "false for allowed"
return $false
}

Expand Down Expand Up @@ -252,11 +258,12 @@ function SetDeploymentOutputs([string]$serviceName, [object]$azContext, [object]
if (ShouldMarkValueAsSecret $serviceDirectoryPrefix $key $value $notSecretValues) {
# Treat all ARM template output variables as secrets since "SecureString" variables do not set values.
# In order to mask secrets but set environment variables for any given ARM template, we set variables twice as shown below.
Write-Host "Setting variable as secret '$key': $value"
Write-Host "##vso[task.setvariable variable=_$key;issecret=true;]$value"
} else {
Write-Host "Setting variable '$key': $value"
$notSecretValues += $value
}
Write-Host "Setting variable '$key': $value"
Write-Host "##vso[task.setvariable variable=$key;]$value"
} else {
Write-Host ($shellExportFormat -f $key, $value)
Expand Down

0 comments on commit 26b1cb4

Please sign in to comment.