Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync eng/common directory with azure-sdk-tools for PR 9943 #8587

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
13 changes: 12 additions & 1 deletion eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ try {
'4d042dc6-fe17-4698-a23f-ec6a8d1e98f4' = 'Azure SDK Test Resources - TME '
}

$wellKnownTenantTMEStatus = @{
'70a036f6-8e4d-4615-bad6-149c02e7720d' = $true # tme testing
'72f988bf-86f1-41af-91ab-2d7cd011db47' = $false # corp
}

# Print which subscription is currently selected.
$subscriptionName = $context.Subscription.Id
if ($wellKnownSubscriptions.ContainsKey($subscriptionName)) {
Expand Down Expand Up @@ -528,7 +533,13 @@ try {
$templateParameters.Add('azsdkPipelineSubnetList', @($env:PoolSubnet))
}
# Some arm/bicep templates may want to change deployment settings (e.g. local auth) in sandboxed TME tenants
$templateParameters.Add('supportsSafeSecretStandard', ($context.Tenant.Name -notlike '*TME*'))
# The pipeline account context does not have the .Tenant.Name property, so check against subscription via
# naming convention instead.
if ($wellKnownTenantTMEStatus.Contains($TenantId)) {
$templateParameters.Add('supportsSafeSecretStandard', !$wellKnownTenantTMEStatus[$TenantId])
} else {
$templateParameters.Add('supportsSafeSecretStandard', $true)
}

$defaultCloudParameters = LoadCloudConfig $Environment
MergeHashes $defaultCloudParameters $(Get-Variable templateParameters)
Expand Down