@@ -17,6 +17,9 @@ parameters:
1717- name : LanguageFilter
1818 type : object
1919 default : []
20+ - name : VnextEmulatorModes
21+ type : object
22+ default : ['Http', 'Https']
2023
2124extends :
2225 template : /eng/pipelines/templates/stages/1es-redirect.yml
@@ -88,15 +91,9 @@ extends:
8891 BuildParallelization : 1
8992 DisableAzureResourceCreation : true
9093 ServiceDirectory : cosmos
91- ACCOUNT_HOST : ' https://localhost:8081/'
92- ACCOUNT_KEY : ' C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
93- SECONDARY_ACCOUNT_KEY : ' C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
9494 # Increased timeout to 90 because of cosmos emulator taking 25-30 mins to download emulator
9595 # Issue filed to improve download speed: https://github.com/Azure/azure-sdk-for-java/issues/12970
9696 TimeoutInMinutes : 120
97- TestGoals : ' clean verify'
98- TestOptions : ' $(ProfileFlag) $(AdditionalArgs)'
99-
10097 PreSteps :
10198 - template : /eng/common/pipelines/templates/steps/cosmos-emulator.yml
10299 parameters :
@@ -123,74 +120,43 @@ extends:
123120 keytool -keystore cacerts -importcert -noprompt -trustcacerts -alias CosmosDbEmulatorCert -file CosmosDbEmulatorCert.cer -storepass changeit
124121 displayName: 'Create Java TrustStore'
125122
126- - stage : TestVNextEmulatorHttp
127- displayName : Test VNext Emulator with Http
128- dependsOn : [ ]
129- variables :
130- - template : /eng/pipelines/templates/variables/globals.yml
131- - template : /eng/pipelines/templates/variables/image.yml
132- - name : ArtifactsJson
133- value : ' ${{ convertToJson(parameters.Artifacts) }}'
134- - name : AdditionalModulesJson
135- value : ' ${{ convertToJson(parameters.AdditionalModules) }}'
136- jobs :
137- - template : /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
138- parameters :
139- JobTemplatePath : /eng/pipelines/templates/jobs/live.tests.yml
140- MatrixConfigs :
141- - Name : Cosmos_vnext_emulator_http_integration
142- Path : eng/pipelines/templates/stages/cosmos-emulator-vnext-matrix.json
143- Selection : all
144- GenerateVMJobs : true
145- MatrixFilters :
146- - ${{ parameters.LanguageFilter }}
147- - ${{ parameters.MatrixFilters }}
148- AdditionalParameters :
149- BuildParallelization : 1
150- DisableAzureResourceCreation : true
151- ServiceDirectory : cosmos
152- ACCOUNT_HOST : ' http://localhost:8081/'
153- ACCOUNT_KEY : ' C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
154- SECONDARY_ACCOUNT_KEY : ' C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
155- TimeoutInMinutes : 120
156- TestGoals : ' clean verify'
157- TestOptions : ' $(ProfileFlag) $(AdditionalArgs) -DACCOUNT_HOST=http://localhost:8081/ -DCOSMOS.HTTP_CONNECTION_WITHOUT_TLS_ALLOWED=true'
158- PreSteps :
159- - template : /eng/pipelines/templates/stages/cosmos-vnext-emulator-http.yml
160- - stage : TestVNextEmulatorHttps
161- displayName : Test VNext Emulator with Https
162- dependsOn : [ ]
163- variables :
164- - template : /eng/pipelines/templates/variables/globals.yml
165- - template : /eng/pipelines/templates/variables/image.yml
166- - name : ArtifactsJson
167- value : ' ${{ convertToJson(parameters.Artifacts) }}'
168- - name : AdditionalModulesJson
169- value : ' ${{ convertToJson(parameters.AdditionalModules) }}'
170- jobs :
171- - template : /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
172- parameters :
173- JobTemplatePath : /eng/pipelines/templates/jobs/live.tests.yml
174- MatrixConfigs :
175- - Name : Cosmos_vnext_emulator_http_integration
176- Path : eng/pipelines/templates/stages/cosmos-emulator-vnext-matrix.json
177- Selection : all
178- GenerateVMJobs : true
179- MatrixFilters :
180- - ${{ parameters.LanguageFilter }}
181- - ${{ parameters.MatrixFilters }}
182- AdditionalParameters :
183- BuildParallelization : 1
184- DisableAzureResourceCreation : true
185- ServiceDirectory : cosmos
186- ACCOUNT_HOST : ' https://localhost:8081/'
187- ACCOUNT_KEY : ' C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
188- SECONDARY_ACCOUNT_KEY : ' C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
189- TimeoutInMinutes : 90
190- TestGoals : ' clean verify'
191- TestOptions : ' $(ProfileFlag) $(AdditionalArgs) -DACCOUNT_HOST=https://localhost:8081/ -DCOSMOS.EMULATOR_SERVER_CERTIFICATE_VALIDATION_DISABLED=true'
192- PreSteps :
193- - template : /eng/pipelines/templates/stages/cosmos-vnext-emulator-https.yml
123+ - ${{ if eq(variables['System.TeamProject'], 'internal') }} :
124+ - ${{ each mode in parameters.VnextEmulatorModes }} :
125+ - stage :
126+ displayName : Test VNext Emulator with ${{ mode }}
127+ dependsOn : [ ]
128+ variables :
129+ - template : /eng/pipelines/templates/variables/globals.yml
130+ - template : /eng/pipelines/templates/variables/image.yml
131+ - name : ArtifactsJson
132+ value : ' ${{ convertToJson(parameters.Artifacts) }}'
133+ - name : AdditionalModulesJson
134+ value : ' ${{ convertToJson(parameters.AdditionalModules) }}'
135+ jobs :
136+ - template : /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
137+ parameters :
138+ JobTemplatePath : /eng/pipelines/templates/jobs/live.tests.yml
139+ MatrixConfigs :
140+ - Name : Cosmos_vnext_emulator_http_integration
141+ Path : eng/pipelines/templates/stages/cosmos-emulator-vnext-matrix.json
142+ Selection : all
143+ GenerateVMJobs : true
144+ MatrixFilters :
145+ - ${{ parameters.LanguageFilter }}
146+ - ${{ parameters.MatrixFilters }}
147+ AdditionalParameters :
148+ BuildParallelization : 1
149+ DisableAzureResourceCreation : true
150+ ServiceDirectory : cosmos
151+ TimeoutInMinutes : 120
152+ ${{ if eq(mode, 'Https') }} :
153+ TestOptions : ' $(ProfileFlag) $(AdditionalArgs) -DACCOUNT_HOST=https://localhost:8081/ -DCOSMOS.EMULATOR_SERVER_CERTIFICATE_VALIDATION_DISABLED=true'
154+ ${{ else }} :
155+ TestOptions : ' $(ProfileFlag) $(AdditionalArgs) -DACCOUNT_HOST=http://localhost:8081/ -DCOSMOS.HTTP_CONNECTION_WITHOUT_TLS_ALLOWED=true'
156+ PreSteps :
157+ - template : /eng/pipelines/templates/steps/cosmos-vnext-emulator.yml
158+ parameters :
159+ Https : ${{ eq(mode, 'Https') }}
194160
195161 # The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
196162 - ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}} :
0 commit comments