Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build subscription configuration from cloud config values #3976

Merged
merged 1 commit into from
Sep 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)