Skip to content

Commit c194034

Browse files
authored
Build subscription configuration from cloud config values (#3976)
1 parent ead6ac3 commit c194034

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

eng/pipelines/templates/jobs/live.tests.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ parameters:
22
- name: Location
33
type: string
44
default: ''
5-
- name: SubscriptionConfiguration
6-
type: string
7-
default: $(sub-config-azure-cloud-test-resources)
85
- name: ServiceDirectory
96
type: string
107
default: not-specified
@@ -109,7 +106,7 @@ jobs:
109106
dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools
110107
displayName: Install coverage tools
111108
# CODE_COVERAGE variable is '' (do-not-generate) in all matrix but linux-gcc
112-
# It is 'enabled' by default on linux-gcc but it can be opt-out by each pipeline (disabled)
109+
# It is 'enabled' by default on linux-gcc but it can be opt-out by each pipeline (disabled)
113110
condition: and(succeededOrFailed(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], ''))
114111
115112
- template: /eng/pipelines/templates/steps/cmake-build.yml
@@ -119,12 +116,16 @@ jobs:
119116
BuildArgs: "$(BuildArgs)"
120117
Env: "$(CmakeEnvArg)"
121118

119+
- template: /eng/common/TestResources/build-test-resource-config.yml
120+
parameters:
121+
SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }}
122+
SubscriptionConfigurations: ${{ parameters.CloudConfig.SubscriptionConfigurations }}
123+
122124
- template: /eng/common/TestResources/deploy-test-resources.yml
123125
parameters:
124126
ServiceDirectory: ${{ parameters.ServiceDirectory }}
125-
${{ if or(parameters.Location, parameters.CloudConfig.Location) }}:
126-
Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }}
127-
SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }}
127+
Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }}
128+
SubscriptionConfiguration: $(SubscriptionConfiguration)
128129

129130
# For non multi-config generator use the same build configuration to run tests
130131
# We don't need to set it to invoke ctest
@@ -191,9 +192,9 @@ jobs:
191192
codeCoverageTool: Cobertura
192193
summaryFileLocation: '$(Build.SourcesDirectory)/**/Cobertura.xml'
193194
displayName: Publish Code Coverage to DevOps
194-
condition: and(succeededOrFailed(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], ''))
195+
condition: and(succeededOrFailed(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], ''))
195196

196197
- template: /eng/common/TestResources/remove-test-resources.yml
197198
parameters:
198199
ServiceDirectory: ${{ parameters.ServiceDirectory }}
199-
SubscriptionConfiguration: ${{ parameters.SubscriptionConfiguration }}
200+
SubscriptionConfiguration: $(SubscriptionConfiguration)

0 commit comments

Comments
 (0)