diff --git a/eng/pipelines/templates/jobs/live.tests.yml b/eng/pipelines/templates/jobs/live.tests.yml index 53c5d91c0a71..09bd7d44b67c 100644 --- a/eng/pipelines/templates/jobs/live.tests.yml +++ b/eng/pipelines/templates/jobs/live.tests.yml @@ -35,12 +35,6 @@ parameters: - name: BuildDocs type: boolean default: true - - name: AllocateResourceGroup - type: boolean - default: true - - name: DeployArmTemplate - type: boolean - default: false - name: TestTimeoutInMinutes type: number default: 120 @@ -93,34 +87,17 @@ jobs: parameters: AgentImage: $(OSVmImage) - - ${{ if eq(parameters['AllocateResourceGroup'], true) }}: - - pwsh: | - $BaseName = 't' + (New-Guid).ToString('n').Substring(0, 16) - $RgName = "rg-${{ parameters.ServiceDirectory }}-$($BaseName)" - $ResourceGroupExpiration = (Get-Date).ToUniversalTime().AddHours(24).ToString("o") - Write-Host "Creating Resource Group: $($RgName)" - Write-Host "##vso[task.setvariable variable=AZURE_RESOURCEGROUP_NAME]$RgName" - - az login --service-principal -u $(provisioner-aad-id) -p $(provisioner-aad-secret) --tenant $(provisioner-aad-tenant) - az account set --subscription $(provisioner-subscription) - - az group create --location westus2 --name $RgName --tags DeleteAfter=$ResourceGroupExpiration BuildId='$(Build.BuildId)' BuildJob='$(Agent.JobName)' BuildNumber='$(Build.BuildNumber)' BuildReason='$(Build.Reason)' - az group wait --created --resource-group $RgName - displayName: Create resource group and environment variable for tests - - # figure out what's up with the create resource group above - - ${{ if eq(parameters['DeployArmTemplate'], true) }}: - - template: /eng/common/TestResources/build-test-resource-config.yml - parameters: - SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }} - SubscriptionConfigurations: ${{ parameters.CloudConfig.SubscriptionConfigurations }} + - template: /eng/common/TestResources/build-test-resource-config.yml + parameters: + SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }} + SubscriptionConfigurations: ${{ parameters.CloudConfig.SubscriptionConfigurations }} - - template: ../../../common/TestResources/deploy-test-resources.yml - parameters: - Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }} - ServiceDirectory: '${{ parameters.ServiceDirectory }}' - SubscriptionConfiguration: $(SubscriptionConfiguration) - ArmTemplateParameters: $(ArmTemplateParameters) + - template: /eng/common/TestResources/deploy-test-resources.yml + parameters: + Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }} + ServiceDirectory: '${{ parameters.ServiceDirectory }}' + SubscriptionConfiguration: $(SubscriptionConfiguration) + ArmTemplateParameters: $(ArmTemplateParameters) - template: ../steps/build-test.yml parameters: @@ -141,14 +118,7 @@ jobs: InjectedPackages: ${{ parameters.InjectedPackages }} BuildDocs: ${{parameters.BuildDocs}} - - ${{ if eq(parameters['AllocateResourceGroup'], true) }}: - - pwsh: | - az group delete --resource-group $env:AZURE_RESOURCEGROUP_NAME -y --no-wait - displayName: Delete resource group - condition: ne(variables['AZURE_RESOURCEGROUP_NAME'], '') - - - ${{ if eq(parameters['DeployArmTemplate'], true) }}: - - template: /eng/common/TestResources/remove-test-resources.yml - parameters: - ServiceDirectory: '${{ parameters.ServiceDirectory }}' - SubscriptionConfiguration: $(SubscriptionConfiguration) + - template: /eng/common/TestResources/remove-test-resources.yml + parameters: + ServiceDirectory: '${{ parameters.ServiceDirectory }}' + SubscriptionConfiguration: $(SubscriptionConfiguration) diff --git a/eng/pipelines/templates/stages/archetype-sdk-tests.yml b/eng/pipelines/templates/stages/archetype-sdk-tests.yml index d0f2952d967f..6a98a05988c0 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-tests.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-tests.yml @@ -38,12 +38,6 @@ parameters: - name: JobName type: string default: 'Test' - - name: AllocateResourceGroup - type: boolean - default: true - - name: DeployArmTemplate - type: boolean - default: false - name: TestTimeoutInMinutes type: number default: 120 @@ -123,8 +117,6 @@ stages: TestMarkArgument: ${{ parameters.TestMarkArgument }} InjectedPackages: ${{ parameters.InjectedPackages }} BuildDocs: ${{ parameters.BuildDocs }} - AllocateResourceGroup: ${{ parameters.AllocateResourceGroup }} - DeployArmTemplate: ${{ parameters.DeployArmTemplate }} TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }} MatrixConfigs: # Enumerate platforms and additional platforms based on supported clouds (sparse platform<-->cloud matrix). diff --git a/sdk/agrifood/tests.yml b/sdk/agrifood/tests.yml index 004442e819e6..05fb543d14ad 100644 --- a/sdk/agrifood/tests.yml +++ b/sdk/agrifood/tests.yml @@ -5,9 +5,7 @@ stages: parameters: Location: westcentralus ServiceDirectory: agrifood - DeployArmTemplate: true Clouds: Public_FarmBeats - AllocateResourceGroup: false CloudConfig: Public_Farmbeats: SubscriptionConfiguration: $(sub-config-farmbeats-azure-cloud-test-resources) @@ -17,4 +15,4 @@ stages: AZURE_TENANT_ID: $(AGRIFOOD_TENANT_ID) TEST_MODE: 'RunLiveNoRecord' AZURE_SKIP_LIVE_RECORDING: 'True' - AZURE_TEST_RUN_LIVE: 'true' \ No newline at end of file + AZURE_TEST_RUN_LIVE: 'true' diff --git a/sdk/appconfiguration/tests.yml b/sdk/appconfiguration/tests.yml index 6a8df5bcd2ef..5f441f17be61 100644 --- a/sdk/appconfiguration/tests.yml +++ b/sdk/appconfiguration/tests.yml @@ -4,8 +4,6 @@ stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: appconfiguration - AllocateResourceGroup: false - DeployArmTemplate: true SupportedClouds: 'Public,UsGov,China' MatrixReplace: - TestSamples=.*/true diff --git a/sdk/attestation/tests.yml b/sdk/attestation/tests.yml index 6b47367f42a8..675be9ecb7af 100644 --- a/sdk/attestation/tests.yml +++ b/sdk/attestation/tests.yml @@ -3,10 +3,8 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: attestation Location: westus - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true diff --git a/sdk/cognitivelanguage/tests.yml b/sdk/cognitivelanguage/tests.yml index cbe99bfbe34a..4f5f79c4d078 100644 --- a/sdk/cognitivelanguage/tests.yml +++ b/sdk/cognitivelanguage/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false BuildTargetingString: azure* ServiceDirectory: cognitivelanguage MatrixReplace: diff --git a/sdk/communication/azure-communication-chat/tests.yml b/sdk/communication/azure-communication-chat/tests.yml index d7accf3dcad9..75731ab2906c 100644 --- a/sdk/communication/azure-communication-chat/tests.yml +++ b/sdk/communication/azure-communication-chat/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-chat' JobName: chat ServiceDirectory: communication - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true CloudConfig: diff --git a/sdk/communication/azure-communication-identity/tests.yml b/sdk/communication/azure-communication-identity/tests.yml index 50e3afb089a3..72061d127ed8 100644 --- a/sdk/communication/azure-communication-identity/tests.yml +++ b/sdk/communication/azure-communication-identity/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-identity' JobName: identity ServiceDirectory: communication - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true CloudConfig: diff --git a/sdk/communication/azure-communication-networktraversal/tests.yml b/sdk/communication/azure-communication-networktraversal/tests.yml index 32b5604a073f..122fe6170843 100644 --- a/sdk/communication/azure-communication-networktraversal/tests.yml +++ b/sdk/communication/azure-communication-networktraversal/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-networktraversal' JobName: networktraversal ServiceDirectory: communication - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true CloudConfig: diff --git a/sdk/communication/azure-communication-phonenumbers/tests.yml b/sdk/communication/azure-communication-phonenumbers/tests.yml index 4fea7d852743..0706786799ef 100644 --- a/sdk/communication/azure-communication-phonenumbers/tests.yml +++ b/sdk/communication/azure-communication-phonenumbers/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-phonenumbers' JobName: phonenumbers ServiceDirectory: communication - DeployArmTemplate: true CloudConfig: Public: SubscriptionConfigurations: diff --git a/sdk/communication/azure-communication-sms/tests.yml b/sdk/communication/azure-communication-sms/tests.yml index 7b3b62949451..0197c3896107 100644 --- a/sdk/communication/azure-communication-sms/tests.yml +++ b/sdk/communication/azure-communication-sms/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-sms' JobName: sms ServiceDirectory: communication - DeployArmTemplate: true CloudConfig: Public: SubscriptionConfigurations: diff --git a/sdk/containerregistry/tests.yml b/sdk/containerregistry/tests.yml index e109e59cac85..de14189c0332 100644 --- a/sdk/containerregistry/tests.yml +++ b/sdk/containerregistry/tests.yml @@ -3,10 +3,8 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false BuildTargetingString: azure-containerregistry ServiceDirectory: containerregistry - DeployArmTemplate: true SupportedClouds: 'Public,UsGov,China' EnvVars: AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) diff --git a/sdk/cosmos/tests.yml b/sdk/cosmos/tests.yml index 62b2ed7f5170..55a530ce2394 100644 --- a/sdk/cosmos/tests.yml +++ b/sdk/cosmos/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' MaxParallel: 1 ServiceDirectory: cosmos TestMarkArgument: not globaldb diff --git a/sdk/digitaltwins/tests.yml b/sdk/digitaltwins/tests.yml index 6b0858347dfd..9063851bebe1 100644 --- a/sdk/digitaltwins/tests.yml +++ b/sdk/digitaltwins/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: azure-digitaltwins-core ServiceDirectory: digitaltwins EnvVars: diff --git a/sdk/eventgrid/tests.yml b/sdk/eventgrid/tests.yml index 1d4b879f5355..99b94c808f21 100644 --- a/sdk/eventgrid/tests.yml +++ b/sdk/eventgrid/tests.yml @@ -4,7 +4,6 @@ stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: eventgrid - DeployArmTemplate: true BuildTargetingString: azure-eventgrid* MatrixReplace: - TestSamples=.*/true diff --git a/sdk/eventhub/azure-mgmt-eventhub/tests.yml b/sdk/eventhub/azure-mgmt-eventhub/tests.yml index 6a6f58e66ee2..3de54faefc1d 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/tests.yml +++ b/sdk/eventhub/azure-mgmt-eventhub/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: eventhub BuildTargetingString: azure-mgmt-eventhub EnvVars: diff --git a/sdk/eventhub/tests.yml b/sdk/eventhub/tests.yml index 024fa153ea3d..90381cb9ce64 100644 --- a/sdk/eventhub/tests.yml +++ b/sdk/eventhub/tests.yml @@ -3,10 +3,8 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: eventhub BuildTargetingString: azure-eventhub* - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true MatrixFilters: diff --git a/sdk/formrecognizer/tests.yml b/sdk/formrecognizer/tests.yml index 1687afdc4888..ca2136b2c623 100644 --- a/sdk/formrecognizer/tests.yml +++ b/sdk/formrecognizer/tests.yml @@ -4,7 +4,6 @@ stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: BuildTargetingString: azure-ai-formrecognizer - DeployArmTemplate: true ServiceDirectory: formrecognizer TestTimeoutInMinutes: 200 MatrixReplace: diff --git a/sdk/identity/tests.yml b/sdk/identity/tests.yml index a718161d366a..88e4b32f2004 100644 --- a/sdk/identity/tests.yml +++ b/sdk/identity/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' ServiceDirectory: identity EnvVars: AZURE_CLIENT_ID: $(python-identity-client-id) diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests.yml b/sdk/keyvault/azure-mgmt-keyvault/tests.yml index ab7cf24f252e..a234ac63d9fe 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests.yml +++ b/sdk/keyvault/azure-mgmt-keyvault/tests.yml @@ -5,7 +5,6 @@ stages: parameters: ServiceDirectory: keyvault BuildTargetingString: azure-mgmt-keyvault - AllocateResourceGroup: true EnvVars: AZURE_TEST_RUN_LIVE: true AZURE_SUBSCRIPTION_ID: $(azure-subscription-id) diff --git a/sdk/keyvault/tests.yml b/sdk/keyvault/tests.yml index dc3c3eb24f37..9dad181188ea 100644 --- a/sdk/keyvault/tests.yml +++ b/sdk/keyvault/tests.yml @@ -16,8 +16,6 @@ stages: ServiceDirectory: keyvault BuildTargetingString: ${{ service }} JobName: ${{ replace(service, '-', '_') }} - DeployArmTemplate: true - AllocateResourceGroup: true TestTimeoutInMinutes: 240 ${{ if or(eq(service, 'azure-keyvault-keys'), eq(service, 'azure-keyvault-administration')) }}: AdditionalMatrixConfigs: diff --git a/sdk/mixedreality/tests.yml b/sdk/mixedreality/tests.yml index c630efffdeff..458762a8a3ee 100644 --- a/sdk/mixedreality/tests.yml +++ b/sdk/mixedreality/tests.yml @@ -3,12 +3,10 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: mixedreality - DeployArmTemplate: true Location: eastus2 EnvVars: AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - TEST_MODE: 'RunLiveNoRecord' \ No newline at end of file + TEST_MODE: 'RunLiveNoRecord' diff --git a/sdk/modelsrepository/tests.yml b/sdk/modelsrepository/tests.yml index 1966f9c2342d..7d831c6449af 100644 --- a/sdk/modelsrepository/tests.yml +++ b/sdk/modelsrepository/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' ServiceDirectory: modelsrepository EnvVars: TEST_MODE: 'RunLiveNoRecord' diff --git a/sdk/schemaregistry/tests.yml b/sdk/schemaregistry/tests.yml index b29323def858..0f7e7316a77b 100644 --- a/sdk/schemaregistry/tests.yml +++ b/sdk/schemaregistry/tests.yml @@ -6,8 +6,6 @@ stages: ServiceDirectory: schemaregistry TestTimeoutInMinutes: 300 BuildTargetingString: azure-schemaregistry* - AllocateResourceGroup: false - DeployArmTemplate: true EnvVars: AZURE_SUBSCRIPTION_ID: $(azure-subscription-id) AZURE_TENANT_ID: $(python-schema-registry-sdk-test-tenant-id) diff --git a/sdk/servicebus/tests.yml b/sdk/servicebus/tests.yml index e40693078864..547413d3276c 100644 --- a/sdk/servicebus/tests.yml +++ b/sdk/servicebus/tests.yml @@ -5,7 +5,6 @@ stages: parameters: ServiceDirectory: servicebus TestTimeoutInMinutes: 300 - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true BuildTargetingString: azure-servicebus* diff --git a/sdk/storage/tests.yml b/sdk/storage/tests.yml index ab080b43e0dc..a9b56917e516 100644 --- a/sdk/storage/tests.yml +++ b/sdk/storage/tests.yml @@ -15,9 +15,7 @@ stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: JobName: ${{ replace(service, '-', '_') }} - AllocateResourceGroup: 'false' BuildTargetingString: ${{ service }} - DeployArmTemplate: true Location: 'canadacentral' # All 5 service stages run in parallel, and with no parallel limits the tests may get throttled. @@ -58,4 +56,4 @@ stages: AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) AZURE_SUBSCRIPTION_ID: $(azure-subscription-id) AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) \ No newline at end of file + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) diff --git a/sdk/tables/tests.yml b/sdk/tables/tests.yml index acd3f2f37712..0934d4732b87 100644 --- a/sdk/tables/tests.yml +++ b/sdk/tables/tests.yml @@ -5,8 +5,6 @@ stages: parameters: BuildTargetingString: azure-data-tables ServiceDirectory: tables - AllocateResourceGroup: false - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true EnvVars: diff --git a/sdk/template/tests.yml b/sdk/template/tests.yml index c5986cd0cd62..b5a96eb083c8 100644 --- a/sdk/template/tests.yml +++ b/sdk/template/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: template MatrixReplace: - TestSamples=.*/true diff --git a/sdk/textanalytics/tests.yml b/sdk/textanalytics/tests.yml index 7f2287fd3323..9e16b049fbed 100644 --- a/sdk/textanalytics/tests.yml +++ b/sdk/textanalytics/tests.yml @@ -5,7 +5,6 @@ stages: parameters: BuildTargetingString: $(BuildTargetingString) ServiceDirectory: textanalytics - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true EnvVars: diff --git a/sdk/translation/tests.yml b/sdk/translation/tests.yml index 2dad0c62e8bd..8d46c6742c50 100644 --- a/sdk/translation/tests.yml +++ b/sdk/translation/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - DeployArmTemplate: true BuildTargetingString: azure-ai-translation-document ServiceDirectory: translation MatrixReplace: