From 4aae431cb58dab90a484e2cca99f047304351bc9 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Thu, 2 Jul 2020 20:52:52 -0700 Subject: [PATCH] Use subscription configuration template pattern that .NET and Java use --- .../jobs/archetype-sdk-integration.yml | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-integration.yml b/eng/pipelines/templates/jobs/archetype-sdk-integration.yml index 8f5340e1fe27..48d3211ac19c 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-integration.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-integration.yml @@ -23,6 +23,15 @@ parameters: - name: PublishCodeCoverage type: boolean default: false +- name: SubscriptionConfiguration + type: string + default: $(sub-config-azure-cloud-test-resources) +- name: ResourceGroupLocation + type: string + default: "" +- name: ArmTemplateParameters + type: string + default: "@{}" - name: TestBrowser type: boolean default: true @@ -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" @@ -82,8 +95,7 @@ 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 @@ -91,8 +103,7 @@ jobs: 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') }}: @@ -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') }}: @@ -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)" @@ -133,6 +141,8 @@ jobs: parameters: ServiceDirectory: "${{ parameters.ResourceServiceDirectory }}" SubscriptionConfiguration: $(SubscriptionConfiguration) + Location: $(ResourceGroupLocation) + ArmTemplateParameters: $(ArmTemplateParameters) - script: | node common/scripts/install-run-rush.js install