From 74e3cf1e2930f888558d0105aa93a751df74a5cc Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Fri, 30 Sep 2022 16:46:24 -0400 Subject: [PATCH] Build subscription configuration from cloud config values --- eng/pipelines/templates/jobs/live.tests.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/eng/pipelines/templates/jobs/live.tests.yml b/eng/pipelines/templates/jobs/live.tests.yml index e5272766e3..fd041f7926 100644 --- a/eng/pipelines/templates/jobs/live.tests.yml +++ b/eng/pipelines/templates/jobs/live.tests.yml @@ -2,9 +2,6 @@ parameters: - name: Location type: string default: '' -- name: SubscriptionConfiguration - type: string - default: $(sub-config-azure-cloud-test-resources) - name: ServiceDirectory type: string default: not-specified @@ -109,7 +106,7 @@ jobs: dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools displayName: Install coverage tools # CODE_COVERAGE variable is '' (do-not-generate) in all matrix but linux-gcc - # It is 'enabled' by default on linux-gcc but it can be opt-out by each pipeline (disabled) + # It is 'enabled' by default on linux-gcc but it can be opt-out by each pipeline (disabled) condition: and(succeededOrFailed(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], '')) - template: /eng/pipelines/templates/steps/cmake-build.yml @@ -119,12 +116,16 @@ jobs: BuildArgs: "$(BuildArgs)" Env: "$(CmakeEnvArg)" + - template: /eng/common/TestResources/build-test-resource-config.yml + parameters: + SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }} + SubscriptionConfigurations: ${{ parameters.CloudConfig.SubscriptionConfigurations }} + - template: /eng/common/TestResources/deploy-test-resources.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - ${{ if or(parameters.Location, parameters.CloudConfig.Location) }}: - Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }} - SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }} + Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }} + SubscriptionConfiguration: $(SubscriptionConfiguration) # For non multi-config generator use the same build configuration to run tests # We don't need to set it to invoke ctest @@ -191,9 +192,9 @@ jobs: codeCoverageTool: Cobertura summaryFileLocation: '$(Build.SourcesDirectory)/**/Cobertura.xml' displayName: Publish Code Coverage to DevOps - condition: and(succeededOrFailed(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], '')) + condition: and(succeededOrFailed(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], '')) - template: /eng/common/TestResources/remove-test-resources.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - SubscriptionConfiguration: ${{ parameters.SubscriptionConfiguration }} + SubscriptionConfiguration: $(SubscriptionConfiguration)