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

Update to use TME subscription #405

Merged
merged 1 commit into from
Oct 25, 2024
Merged
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
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
Loading