Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
58 changes: 14 additions & 44 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: ../../../common/TestResources/deploy-test-resources.yml
Comment thread
benbp marked this conversation as resolved.
Outdated
parameters:
Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }}
ServiceDirectory: '${{ parameters.ServiceDirectory }}'
SubscriptionConfiguration: $(SubscriptionConfiguration)
ArmTemplateParameters: $(ArmTemplateParameters)

- template: ../steps/build-test.yml
parameters:
Expand All @@ -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)
8 changes: 0 additions & 8 deletions eng/pipelines/templates/stages/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand Down
4 changes: 1 addition & 3 deletions sdk/agrifood/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -17,4 +15,4 @@ stages:
AZURE_TENANT_ID: $(AGRIFOOD_TENANT_ID)
TEST_MODE: 'RunLiveNoRecord'
AZURE_SKIP_LIVE_RECORDING: 'True'
AZURE_TEST_RUN_LIVE: 'true'
AZURE_TEST_RUN_LIVE: 'true'
2 changes: 0 additions & 2 deletions sdk/appconfiguration/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions sdk/attestation/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion sdk/cognitivelanguage/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ trigger: none
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
AllocateResourceGroup: false
BuildTargetingString: azure*
ServiceDirectory: cognitivelanguage
MatrixReplace:
Expand Down
2 changes: 0 additions & 2 deletions sdk/communication/azure-communication-chat/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions sdk/communication/azure-communication-identity/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions sdk/communication/azure-communication-sms/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions sdk/containerregistry/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion sdk/cosmos/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion sdk/digitaltwins/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion sdk/eventgrid/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion sdk/eventhub/azure-mgmt-eventhub/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion sdk/formrecognizer/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion sdk/identity/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion sdk/keyvault/azure-mgmt-keyvault/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions sdk/keyvault/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions sdk/mixedreality/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
TEST_MODE: 'RunLiveNoRecord'
1 change: 0 additions & 1 deletion sdk/modelsrepository/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 0 additions & 2 deletions sdk/schemaregistry/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion sdk/servicebus/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ stages:
parameters:
ServiceDirectory: servicebus
TestTimeoutInMinutes: 300
DeployArmTemplate: true
MatrixReplace:
- TestSamples=.*/true
BuildTargetingString: azure-servicebus*
Expand Down
4 changes: 1 addition & 3 deletions sdk/storage/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)
2 changes: 0 additions & 2 deletions sdk/tables/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ stages:
parameters:
BuildTargetingString: azure-data-tables
ServiceDirectory: tables
AllocateResourceGroup: false
DeployArmTemplate: true
MatrixReplace:
- TestSamples=.*/true
EnvVars:
Expand Down
1 change: 0 additions & 1 deletion sdk/template/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ trigger: none
stages:
- template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml
parameters:
AllocateResourceGroup: false
ServiceDirectory: template
MatrixReplace:
- TestSamples=.*/true
Expand Down
1 change: 0 additions & 1 deletion sdk/textanalytics/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ stages:
parameters:
BuildTargetingString: $(BuildTargetingString)
ServiceDirectory: textanalytics
DeployArmTemplate: true
MatrixReplace:
- TestSamples=.*/true
EnvVars:
Expand Down
1 change: 0 additions & 1 deletion sdk/translation/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down