Skip to content

Commit

Permalink
Build subscription configuration from cloud config values (#3976)
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp authored Sep 30, 2022
1 parent ead6ac3 commit c194034
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)

0 comments on commit c194034

Please sign in to comment.