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

Use subscription configuration template pattern that .NET and Java use #9891

Merged
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
38 changes: 24 additions & 14 deletions eng/pipelines/templates/jobs/archetype-sdk-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ parameters:
- name: PublishCodeCoverage
type: boolean
default: false
- name: SubscriptionConfiguration
type: string
default: $(sub-config-azure-cloud-test-resources)
- name: ResourceGroupLocation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we diverge from calling this "Location"?

type: string
default: ""
- name: ArmTemplateParameters
type: string
default: "@{}"
- name: TestBrowser
type: boolean
default: true
Expand Down Expand Up @@ -57,15 +66,19 @@ jobs:

variables:
- template: ../variables/globals.yml
- name: SubscriptionConfiguration
value: ${{ parameters.SubscriptionConfiguration }}
- name: ResourceGroupLocation
value: ${{ parameters.ResourceGroupLocation }}
- name: ArmTemplateParameters
value: ${{ parameters.ArmTemplateParameters }}


strategy:
maxParallel: ${{ parameters.MaxParallel }}
matrix:
${{ each matrixEntry in parameters.Matrix }}:
${{ matrixEntry.key }}:
# If no CloudType, use "AzureCloud"
${{ if eq(matrixEntry.value.CloudType, '') }}:
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
${{ matrixEntry.key }}:
# TestResultsFiles
${{ if eq(matrixEntry.value.TestType, 'browser' )}}:
TestResultsFiles: "**/test-results.browser.xml"
Expand All @@ -82,17 +95,15 @@ jobs:
Windows Browser:
OSVmImage: "windows-2019"
TestType: "browser"
NodeTestVersion: "12.x"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
NodeTestVersion: "12.x"
TestResultsFiles: "**/test-results.browser.xml"

# Add matrix entry for sample testing
${{ if eq(parameters.TestSamples, 'true') }}:
Samples Linux Node 10:
OSVmImage: "ubuntu-18.04"
TestType: "sample"
NodeTestVersion: "10.x"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
NodeTestVersion: "10.x"

# Add matrix entry for min-max testing
${{ if eq(parameters.TestMinMax, 'true') }}:
Expand All @@ -101,15 +112,13 @@ jobs:
TestType: "node"
DependencyVersion: max
NodeTestVersion: "12.x"
TestResultsFiles: "**/test-results.xml"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
TestResultsFiles: "**/test-results.xml"
MinVersion_Node:
OSVmImage: "ubuntu-18.04"
TestType: "node"
DependencyVersion: min
NodeTestVersion: "12.x"
TestResultsFiles: "**/test-results.xml"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
TestResultsFiles: "**/test-results.xml"

# Add matrix entry for same dep testing
${{ if eq(parameters.TestSame, 'true') }}:
Expand All @@ -118,8 +127,7 @@ jobs:
TestType: "node"
DependencyVersion: same
NodeTestVersion: "12.x"
TestResultsFiles: "**/test-results.xml"
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
TestResultsFiles: "**/test-results.xml"
pool:
vmImage: "$(OSVmImage)"

Expand All @@ -133,6 +141,8 @@ jobs:
parameters:
ServiceDirectory: "${{ parameters.ResourceServiceDirectory }}"
SubscriptionConfiguration: $(SubscriptionConfiguration)
Location: $(ResourceGroupLocation)
ArmTemplateParameters: $(ArmTemplateParameters)

- script: |
node common/scripts/install-run-rush.js install
Expand Down