Skip to content

Commit

Permalink
Update to use TME subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard authored Oct 24, 2024
1 parent 15a2ef4 commit 741c8cc
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions .azure-pipelines/test-eh-sb-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ steps:
displayName: 'Get variables if EventHub'
condition: eq(variables['SDK'], 'EventHub')
inputs:
azureSubscription: azure-sdk-tests
azureSubscription: azure-sdk-tests-public
ScriptType: InlineScript
azurePowerShellVersion: LatestVersion
pwsh: true
Expand All @@ -20,7 +20,7 @@ steps:
displayName: 'Get variables if ServiceBus'
condition: eq(variables['SDK'], 'ServiceBus')
inputs:
azureSubscription: azure-sdk-tests
azureSubscription: azure-sdk-tests-public
ScriptType: InlineScript
azurePowerShellVersion: LatestVersion
pwsh: true
Expand All @@ -41,16 +41,29 @@ steps:
- task: AzurePowerShell@5
inputs:
workingDirectory: azure-sdk-for-python
azureSubscription: azure-sdk-tests
azureSubscription: azure-sdk-tests-public
azurePowerShellVersion: LatestVersion
pwsh: True
ScriptType: InlineScript
Inline: |
eng/common/scripts/Import-AzModules.ps1
$subscriptionConfiguration = @'
$(sub-config-azure-cloud-test-resources)
'@ | ConvertFrom-Json -AsHashtable;
$subscriptionConfiguration = @{}
$context = Get-AzContext
$subscriptionConfiguration["Environment"] = $context.Environment.Name
$subscriptionConfiguration["SubscriptionId"] = $context.Subscription.Id
$subscriptionConfiguration["TenantId"] = $context.Subscription.TenantId
$subscriptionConfiguration["TestApplicationId"] = $context.Account.Id
$subscriptionConfiguration["ProvisionerApplicationId"] = $context.Account.Id
$principal = Get-AzADServicePrincipal -ApplicationId $context.Account.Id
$subscriptionConfiguration["TestApplicationOid"] = $principal.Id
$subscriptionConfiguration["ProvisionerApplicationOid"] = $principal.Id
Write-Host ($subscriptionConfiguration | ConvertTo-Json)
# Write the new SubscriptionConfiguration to be used by the remove test resources
Write-Host "##vso[task.setvariable variable=SubscriptionConfiguration;]$($subscriptionConfiguration | ConvertTo-Json -Compress)"
eng/common/TestResources/New-TestResources.ps1 `
-ResourceType test `
Expand Down Expand Up @@ -88,7 +101,7 @@ steps:
TEST_PYAMQP: 'false'
PROXY_URL: 'http://localhost:5000'
inputs:
azureSubscription: azure-sdk-tests
azureSubscription: azure-sdk-tests-public
azurePowerShellVersion: LatestVersion
pwsh: true
ScriptType: InlineScript
Expand Down Expand Up @@ -116,15 +129,15 @@ steps:
- task: AzurePowerShell@5
inputs:
workingDirectory: azure-sdk-for-python
azureSubscription: azure-sdk-tests
azureSubscription: azure-sdk-tests-public
azurePowerShellVersion: LatestVersion
pwsh: True
ScriptType: InlineScript
Inline: |
eng/common/scripts/Import-AzModules.ps1
$subscriptionConfiguration = @'
$(sub-config-azure-cloud-test-resources)
$(SubscriptionConfiguration)
'@ | ConvertFrom-Json -AsHashtable;
eng/common/TestResources/Remove-TestResources.ps1 `
Expand Down

0 comments on commit 741c8cc

Please sign in to comment.