Skip to content

Commit 5835f9c

Browse files
authored
Add Storage Live Test Run to Core Live Test Run (Azure#24499)
Add Storage Live Test Run to Core Live Test Run
1 parent b59c663 commit 5835f9c

File tree

3 files changed

+117
-105
lines changed

3 files changed

+117
-105
lines changed

sdk/core/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,7 @@ stages:
7474
- name: azure-core-jackson-tests
7575
groupId: com.azure
7676
safeName: azurecorejacksontests
77+
- template: /sdk/storage/tests-template.yml
78+
parameters:
79+
AdditionalMatrixReplace:
80+
- TestFromSource=(.*)/true

sdk/storage/tests-template.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
parameters:
2+
- name: AdditionalMatrixReplace
3+
type: object
4+
default: []
5+
6+
stages:
7+
- template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
8+
parameters:
9+
ServiceDirectory: storage
10+
Artifacts:
11+
- name: azure-storage-common
12+
groupId: com.azure
13+
safeName: azurestoragecommon
14+
- name: azure-storage-blob
15+
groupId: com.azure
16+
safeName: azurestorageblob
17+
- name: azure-storage-blob-batch
18+
groupId: com.azure
19+
safeName: azurestorageblobbatch
20+
- name: azure-storage-blob-changefeed
21+
groupId: com.azure
22+
safeName: azurestorageblobchangefeed
23+
- name: azure-storage-blob-cryptography
24+
groupId: com.azure
25+
safeName: azurestorageblobcryptography
26+
- name: azure-storage-blob-nio
27+
groupId: com.azure
28+
safeName: azurestorageblobnio
29+
- name: azure-storage-file-share
30+
groupId: com.azure
31+
safeName: azurestoragefileshare
32+
- name: azure-storage-file-datalake
33+
groupId: com.azure
34+
safeName: azurestoragefiledatalake
35+
- name: azure-storage-internal-avro
36+
groupId: com.azure
37+
safeName: azurestorageinternalavro
38+
- name: azure-storage-queue
39+
groupId: com.azure
40+
safeName: azurestoragequeue
41+
AdditionalModules:
42+
- name: perf-test-core
43+
groupId: com.azure
44+
- name: azure-storage-perf
45+
groupId: com.azure
46+
TestMode: 'LIVE'
47+
TimeoutInMinutes: 60
48+
Location: canadacentral
49+
CloudConfig:
50+
Preview:
51+
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
52+
PrivatePreview:
53+
SubscriptionConfiguration: $(sub-config-storage-test-resources)
54+
Clouds: Preview
55+
SupportedClouds: Preview
56+
TestStepMavenInputs:
57+
options: '$(DefaultTestOptions) $(AdditionalOptions) -T 1C'
58+
mavenOptions: '$(DefaultTestMavenOptions)'
59+
MatrixReplace:
60+
# Use dedicated storage pool in canadacentral with higher memory capacity
61+
- Pool=(.*)-general/$1-storage
62+
- ${{ each additionalReplace in parameters.AdditionalMatrixReplace }}:
63+
- ${{ additionalReplace }}
64+
MatrixConfigs:
65+
- ${{ if contains(variables['Build.DefinitionName'], 'tests-weekly') }}:
66+
- Name: Storage_all_versions_live_test
67+
Path: sdk/storage/platform-matrix-all-versions.json
68+
Selection: sparse
69+
GenerateVMJobs: true
70+
- ${{ if not(contains(variables['Build.DefinitionName'], 'tests-weekly')) }}:
71+
- Name: Storage_live_test
72+
Path: sdk/storage/platform-matrix.json
73+
Selection: sparse
74+
GenerateVMJobs: true
75+
PreSteps:
76+
- template: /sdk/storage/tests-install-azurite.yml
77+
PostSteps:
78+
- task: PowerShell@2
79+
displayName: 'Run Stress Scenarios'
80+
inputs:
81+
targetType: 'filePath'
82+
filePath: sdk/storage/azure-storage-perf/memory-stress-scenarios.ps1
83+
env:
84+
${{ if eq(variables['JavaTestVersion'], '1.11') }}:
85+
JAVA_HOME: $(JAVA_HOME_11_X64)
86+
${{ if eq(variables['JavaTestVersion'], '1.8') }}:
87+
JAVA_HOME: $(JAVA_HOME_8_X64)
88+
condition: and(succeeded(), eq(variables['StorageRunStressScenarios'], 'true'))
89+
- pwsh: |
90+
New-Item $(Build.ArtifactStagingDirectory)/test-logs -ItemType directory
91+
Copy-Item sdk/storage/azure-storage-blob/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-test.log -ErrorAction SilentlyContinue
92+
Copy-Item sdk/storage/azure-storage-blob-batch/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-batch-test.log -ErrorAction SilentlyContinue
93+
Copy-Item sdk/storage/azure-storage-blob-changefeed/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-changefeed-test.log -ErrorAction SilentlyContinue
94+
Copy-Item sdk/storage/azure-storage-blob-cryptography/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-cryptography-test.log -ErrorAction SilentlyContinue
95+
Copy-Item sdk/storage/azure-storage-blob-nio/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-nio-test.log -ErrorAction SilentlyContinue
96+
Copy-Item sdk/storage/azure-storage-common/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-common-test.log -ErrorAction SilentlyContinue
97+
Copy-Item sdk/storage/azure-storage-file-datalake/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-file-datalake-test.log -ErrorAction SilentlyContinue
98+
Copy-Item sdk/storage/azure-storage-file-share/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-file-share-test.log -ErrorAction SilentlyContinue
99+
Copy-Item sdk/storage/azure-storage-internal-avro/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-internal-avro-test.log -ErrorAction SilentlyContinue
100+
Copy-Item sdk/storage/azure-storage-queue/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-queue-test.log -ErrorAction SilentlyContinue
101+
displayName: 'Copy test logs to artifact staging'
102+
condition: always()
103+
- publish: $(Build.ArtifactStagingDirectory)/test-logs
104+
displayName: 'Publish test logs'
105+
artifact: test-log-$(System.StageName)-$(System.JobName)-$(System.JobAttempt)
106+
condition: always()
107+
EnvVars:
108+
AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id)
109+
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)
110+
AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret)
111+
VERSIONED_STORAGE_ACCOUNT_NAME: $(java-storage-versioned-account-name)
112+
VERSIONED_STORAGE_ACCOUNT_KEY: $(java-storage-versioned-account-key)

sdk/storage/tests.yml

Lines changed: 1 addition & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,4 @@
11
trigger: none
22

33
stages:
4-
- template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
5-
parameters:
6-
ServiceDirectory: storage
7-
Artifacts:
8-
- name: azure-storage-common
9-
groupId: com.azure
10-
safeName: azurestoragecommon
11-
- name: azure-storage-blob
12-
groupId: com.azure
13-
safeName: azurestorageblob
14-
- name: azure-storage-blob-batch
15-
groupId: com.azure
16-
safeName: azurestorageblobbatch
17-
- name: azure-storage-blob-changefeed
18-
groupId: com.azure
19-
safeName: azurestorageblobchangefeed
20-
- name: azure-storage-blob-cryptography
21-
groupId: com.azure
22-
safeName: azurestorageblobcryptography
23-
- name: azure-storage-blob-nio
24-
groupId: com.azure
25-
safeName: azurestorageblobnio
26-
- name: azure-storage-file-share
27-
groupId: com.azure
28-
safeName: azurestoragefileshare
29-
- name: azure-storage-file-datalake
30-
groupId: com.azure
31-
safeName: azurestoragefiledatalake
32-
- name: azure-storage-internal-avro
33-
groupId: com.azure
34-
safeName: azurestorageinternalavro
35-
- name: azure-storage-queue
36-
groupId: com.azure
37-
safeName: azurestoragequeue
38-
AdditionalModules:
39-
- name: perf-test-core
40-
groupId: com.azure
41-
- name: azure-storage-perf
42-
groupId: com.azure
43-
TestMode: 'LIVE'
44-
TimeoutInMinutes: 60
45-
Location: canadacentral
46-
CloudConfig:
47-
Preview:
48-
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
49-
PrivatePreview:
50-
SubscriptionConfiguration: $(sub-config-storage-test-resources)
51-
Clouds: Preview
52-
SupportedClouds: Preview
53-
TestStepMavenInputs:
54-
options: '$(DefaultTestOptions) $(AdditionalOptions) -T 1C'
55-
mavenOptions: '$(DefaultTestMavenOptions)'
56-
MatrixReplace:
57-
# Use dedicated storage pool in canadacentral with higher memory capacity
58-
- Pool=(.*)-general/$1-storage
59-
MatrixConfigs:
60-
- ${{ if contains(variables['Build.DefinitionName'], 'tests-weekly') }}:
61-
- Name: Storage_all_versions_live_test
62-
Path: sdk/storage/platform-matrix-all-versions.json
63-
Selection: sparse
64-
GenerateVMJobs: true
65-
- ${{ if not(contains(variables['Build.DefinitionName'], 'tests-weekly')) }}:
66-
- Name: Storage_live_test
67-
Path: sdk/storage/platform-matrix.json
68-
Selection: sparse
69-
GenerateVMJobs: true
70-
PreSteps:
71-
- template: /sdk/storage/tests-install-azurite.yml
72-
PostSteps:
73-
- task: PowerShell@2
74-
displayName: 'Run Stress Scenarios'
75-
inputs:
76-
targetType: 'filePath'
77-
filePath: sdk/storage/azure-storage-perf/memory-stress-scenarios.ps1
78-
env:
79-
${{ if eq(variables['JavaTestVersion'], '1.11') }}:
80-
JAVA_HOME: $(JAVA_HOME_11_X64)
81-
${{ if eq(variables['JavaTestVersion'], '1.8') }}:
82-
JAVA_HOME: $(JAVA_HOME_8_X64)
83-
condition: and(succeeded(), eq(variables['StorageRunStressScenarios'], 'true'))
84-
- pwsh: |
85-
New-Item $(Build.ArtifactStagingDirectory)/test-logs -ItemType directory
86-
Copy-Item sdk/storage/azure-storage-blob/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-test.log -ErrorAction SilentlyContinue
87-
Copy-Item sdk/storage/azure-storage-blob-batch/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-batch-test.log -ErrorAction SilentlyContinue
88-
Copy-Item sdk/storage/azure-storage-blob-changefeed/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-changefeed-test.log -ErrorAction SilentlyContinue
89-
Copy-Item sdk/storage/azure-storage-blob-cryptography/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-cryptography-test.log -ErrorAction SilentlyContinue
90-
Copy-Item sdk/storage/azure-storage-blob-nio/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-blob-nio-test.log -ErrorAction SilentlyContinue
91-
Copy-Item sdk/storage/azure-storage-common/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-common-test.log -ErrorAction SilentlyContinue
92-
Copy-Item sdk/storage/azure-storage-file-datalake/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-file-datalake-test.log -ErrorAction SilentlyContinue
93-
Copy-Item sdk/storage/azure-storage-file-share/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-file-share-test.log -ErrorAction SilentlyContinue
94-
Copy-Item sdk/storage/azure-storage-internal-avro/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-internal-avro-test.log -ErrorAction SilentlyContinue
95-
Copy-Item sdk/storage/azure-storage-queue/target/test.log $(Build.ArtifactStagingDirectory)/test-logs/azure-storage-queue-test.log -ErrorAction SilentlyContinue
96-
displayName: 'Copy test logs to artifact staging'
97-
condition: always()
98-
- publish: $(Build.ArtifactStagingDirectory)/test-logs
99-
displayName: 'Publish test logs'
100-
artifact: test-log-$(System.StageName)-$(System.JobName)-$(System.JobAttempt)
101-
condition: always()
102-
EnvVars:
103-
AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id)
104-
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)
105-
AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret)
106-
VERSIONED_STORAGE_ACCOUNT_NAME: $(java-storage-versioned-account-name)
107-
VERSIONED_STORAGE_ACCOUNT_KEY: $(java-storage-versioned-account-key)
108-
4+
- template: /sdk/storage/tests-template.yml

0 commit comments

Comments
 (0)