From af410f1b687ad67917a9f1bc567bea3fe6a0c6f6 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 11:19:36 -0700 Subject: [PATCH 01/26] Smoke test isolation per package --- .../templates/stages/archetype-python-release.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 622ea69bf038..6ff1e43ffe70 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -222,16 +222,13 @@ stages: PRTitle: "Increment version for ${{ parameters.ServiceDirectory }} releases" PRLabels: "auto-merge" CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' + - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: + - displayname: Smoke Test Release Package + template: /eng/pipelines/templates/jobs/smoke.tests.yml + parameters: + Daily: false + ArtifactName: ${{artifact.name}} - - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: - - stage: SmokeTest_Release_Packages - displayName: Smoke Test Release Packages - jobs: - - template: /eng/pipelines/templates/jobs/smoke.tests.yml - parameters: - Daily: false - ArtifactName: ${{ parameters.ArtifactName }} - Artifacts: ${{ parameters.Artifacts }} - stage: Integration dependsOn: ${{parameters.DependsOn}} From 6b68e9135be5307e4eeeb07490d11d93253a5800 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 11:27:49 -0700 Subject: [PATCH 02/26] Smoke test isolation - remove unnecessary params --- eng/pipelines/templates/stages/archetype-python-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 6ff1e43ffe70..2b1b5de52862 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -223,8 +223,7 @@ stages: PRLabels: "auto-merge" CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: - - displayname: Smoke Test Release Package - template: /eng/pipelines/templates/jobs/smoke.tests.yml + - template: /eng/pipelines/templates/jobs/smoke.tests.yml parameters: Daily: false ArtifactName: ${{artifact.name}} From 26b0d3d9fc18cc0af88a15cde0709ca81285e9aa Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 15:27:36 -0700 Subject: [PATCH 03/26] Passing in single artifact for smoke test --- eng/pipelines/templates/jobs/smoke.tests.yml | 23 +++++++++---------- .../stages/archetype-python-release.yml | 1 + 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index 5b762eeb3ad1..af874a084fd6 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -1,9 +1,9 @@ parameters: - name: Daily default: true - - name: Artifacts + - name: Artifact type: object - default: [] + default: {} - name: ArtifactName type: string default: "not-specified" @@ -16,16 +16,15 @@ jobs: name: "azsdk-pool-mms-ubuntu-2004-general" vmImage: "MMSUbuntu20.04" steps: - - ${{ each artifact in parameters.Artifacts }}: - - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: - - pwsh: | - $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt - if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { - Write-Host "Smoke tests will run for ${{ artifact.name }}" - Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" - } - name: check_smoke_tests_${{ artifact.safeName }} - displayName: Check smoke test eligibility for ${{ artifact.name }} + - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: + - pwsh: | + $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt + if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { + Write-Host "Smoke tests will run for ${{ artifact.name }}" + Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" + } + name: check_smoke_tests_${{ artifact.safeName }} + displayName: Check smoke test eligibility for ${{ artifact.name }} - pwsh: | Write-Host "Setting RunSmokeTests to $($env:RunSmokeTests)" diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 2b1b5de52862..66a0a6e0af9b 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -227,6 +227,7 @@ stages: parameters: Daily: false ArtifactName: ${{artifact.name}} + Artifact: ${{artifact}} - stage: Integration From 8ffa999eb33109ab9aad42bab40a34bd1ae50085 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 15:32:17 -0700 Subject: [PATCH 04/26] Passing in single artifact for smoke test --- eng/pipelines/templates/jobs/smoke.tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index af874a084fd6..a0e82966524b 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -16,15 +16,15 @@ jobs: name: "azsdk-pool-mms-ubuntu-2004-general" vmImage: "MMSUbuntu20.04" steps: - - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: + - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(parameters.Artifact.skipPublishPackage, 'true')) }}: - pwsh: | $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt - if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { - Write-Host "Smoke tests will run for ${{ artifact.name }}" + if ($packages | Where-Object { $_ -match "${{ replace(parameters.Artifact.name, '_', '-') }}" }) { + Write-Host "Smoke tests will run for ${{ parameters.Artifact.name }}" Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" } - name: check_smoke_tests_${{ artifact.safeName }} - displayName: Check smoke test eligibility for ${{ artifact.name }} + name: check_smoke_tests_${{ parameters.Artifact.safeName }} + displayName: Check smoke test eligibility for ${{ parameters.Artifact.name }} - pwsh: | Write-Host "Setting RunSmokeTests to $($env:RunSmokeTests)" From e2287473c45e748ba26c8a8731faf7244360b34f Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Aug 2021 10:46:29 -0700 Subject: [PATCH 05/26] Temporarily adding azure-template in requirements-release --- common/smoketest/requirements-release.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/smoketest/requirements-release.txt b/common/smoketest/requirements-release.txt index f32ec3483233..f6d480b38170 100644 --- a/common/smoketest/requirements-release.txt +++ b/common/smoketest/requirements-release.txt @@ -6,3 +6,4 @@ azure-keyvault-certificates>=0.0.0b1 azure-keyvault-keys>=0.0.0b1 azure-keyvault-secrets>=0.0.0b1 azure-storage-blob>=0.0.0b1 +azure-template>=0.0.0b1 \ No newline at end of file From 39b795e6e680835691358e67a3ac8c510679ae43 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 11:19:36 -0700 Subject: [PATCH 06/26] Smoke test isolation per package --- .../templates/stages/archetype-python-release.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 622ea69bf038..6ff1e43ffe70 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -222,16 +222,13 @@ stages: PRTitle: "Increment version for ${{ parameters.ServiceDirectory }} releases" PRLabels: "auto-merge" CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' + - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: + - displayname: Smoke Test Release Package + template: /eng/pipelines/templates/jobs/smoke.tests.yml + parameters: + Daily: false + ArtifactName: ${{artifact.name}} - - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: - - stage: SmokeTest_Release_Packages - displayName: Smoke Test Release Packages - jobs: - - template: /eng/pipelines/templates/jobs/smoke.tests.yml - parameters: - Daily: false - ArtifactName: ${{ parameters.ArtifactName }} - Artifacts: ${{ parameters.Artifacts }} - stage: Integration dependsOn: ${{parameters.DependsOn}} From addea25ba74b6b5d5af4544e202222996555e9b3 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 11:27:49 -0700 Subject: [PATCH 07/26] Smoke test isolation - remove unnecessary params --- eng/pipelines/templates/stages/archetype-python-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 6ff1e43ffe70..2b1b5de52862 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -223,8 +223,7 @@ stages: PRLabels: "auto-merge" CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: - - displayname: Smoke Test Release Package - template: /eng/pipelines/templates/jobs/smoke.tests.yml + - template: /eng/pipelines/templates/jobs/smoke.tests.yml parameters: Daily: false ArtifactName: ${{artifact.name}} From 92517991a7a9b4caf88c4300552b2c62580854c4 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 15:27:36 -0700 Subject: [PATCH 08/26] Passing in single artifact for smoke test --- eng/pipelines/templates/jobs/smoke.tests.yml | 23 +++++++++---------- .../stages/archetype-python-release.yml | 1 + 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index 5b762eeb3ad1..af874a084fd6 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -1,9 +1,9 @@ parameters: - name: Daily default: true - - name: Artifacts + - name: Artifact type: object - default: [] + default: {} - name: ArtifactName type: string default: "not-specified" @@ -16,16 +16,15 @@ jobs: name: "azsdk-pool-mms-ubuntu-2004-general" vmImage: "MMSUbuntu20.04" steps: - - ${{ each artifact in parameters.Artifacts }}: - - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: - - pwsh: | - $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt - if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { - Write-Host "Smoke tests will run for ${{ artifact.name }}" - Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" - } - name: check_smoke_tests_${{ artifact.safeName }} - displayName: Check smoke test eligibility for ${{ artifact.name }} + - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: + - pwsh: | + $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt + if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { + Write-Host "Smoke tests will run for ${{ artifact.name }}" + Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" + } + name: check_smoke_tests_${{ artifact.safeName }} + displayName: Check smoke test eligibility for ${{ artifact.name }} - pwsh: | Write-Host "Setting RunSmokeTests to $($env:RunSmokeTests)" diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 2b1b5de52862..66a0a6e0af9b 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -227,6 +227,7 @@ stages: parameters: Daily: false ArtifactName: ${{artifact.name}} + Artifact: ${{artifact}} - stage: Integration From f6b62a9dfffde3ff32b516e822246d5f94d73e05 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 15:32:17 -0700 Subject: [PATCH 09/26] Passing in single artifact for smoke test --- eng/pipelines/templates/jobs/smoke.tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index af874a084fd6..a0e82966524b 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -16,15 +16,15 @@ jobs: name: "azsdk-pool-mms-ubuntu-2004-general" vmImage: "MMSUbuntu20.04" steps: - - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: + - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(parameters.Artifact.skipPublishPackage, 'true')) }}: - pwsh: | $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt - if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { - Write-Host "Smoke tests will run for ${{ artifact.name }}" + if ($packages | Where-Object { $_ -match "${{ replace(parameters.Artifact.name, '_', '-') }}" }) { + Write-Host "Smoke tests will run for ${{ parameters.Artifact.name }}" Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" } - name: check_smoke_tests_${{ artifact.safeName }} - displayName: Check smoke test eligibility for ${{ artifact.name }} + name: check_smoke_tests_${{ parameters.Artifact.safeName }} + displayName: Check smoke test eligibility for ${{ parameters.Artifact.name }} - pwsh: | Write-Host "Setting RunSmokeTests to $($env:RunSmokeTests)" From 108f9d1dc554ad31942387db40f9cfdd8b2d3541 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Aug 2021 10:46:29 -0700 Subject: [PATCH 10/26] Temporarily adding azure-template in requirements-release --- common/smoketest/requirements-release.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/smoketest/requirements-release.txt b/common/smoketest/requirements-release.txt index f32ec3483233..f6d480b38170 100644 --- a/common/smoketest/requirements-release.txt +++ b/common/smoketest/requirements-release.txt @@ -6,3 +6,4 @@ azure-keyvault-certificates>=0.0.0b1 azure-keyvault-keys>=0.0.0b1 azure-keyvault-secrets>=0.0.0b1 azure-storage-blob>=0.0.0b1 +azure-template>=0.0.0b1 \ No newline at end of file From f063941b2f3cbb6331f13533a7d42860c398adb0 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Aug 2021 13:36:35 -0700 Subject: [PATCH 11/26] Smoke test isolation - ArtifactName fix --- eng/pipelines/templates/stages/archetype-python-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 66a0a6e0af9b..97fcc664f43a 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -226,7 +226,7 @@ stages: - template: /eng/pipelines/templates/jobs/smoke.tests.yml parameters: Daily: false - ArtifactName: ${{artifact.name}} + ArtifactName: ${{parameters.ArtifactName}} Artifact: ${{artifact}} From 3b56a248fb1c8b507029814c7ba2503ca342204e Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Aug 2021 15:11:01 -0700 Subject: [PATCH 12/26] Smoke test isolation - trimming down env matrix --- eng/pipelines/templates/jobs/smoke.tests.yml | 164 ++++++++++--------- 1 file changed, 86 insertions(+), 78 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index a0e82966524b..caf2578af396 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -38,84 +38,92 @@ jobs: dependsOn: smoke_test_eligibility condition: and(succeeded(), eq(dependencies.smoke_test_eligibility.outputs['output_eligibility.RunSmokeTests'], true)) strategy: - matrix: - Python_27_Linux (AzureCloud): - PythonVersion: '2.7' - SkipAsyncInstall: true - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_37_Linux (AzureCloud): - PythonVersion: '3.7' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Linux (AzureCloud): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Linux (AzureCloud Canary): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) - ArmTemplateParameters: $(azureCloudArmParameters) - Location: 'eastus2euap' - Python_37_Windows (AzureCloud): - PythonVersion: '3.7' - Pool: "azsdk-pool-mms-win-2019-general" - OSVmImage: "MMS2019" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Windows (AzureCloud): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_37_Mac (AzureCloud): - PythonVersion: '3.7' - Pool: Azure Pipelines - OSVmImage: macOS-10.15 - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Mac (AzureCloud): - PythonVersion: '3.8' - Pool: Azure Pipelines - OSVmImage: macOS-10.15 - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Linux (AzureUSGovernment): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu120.04" - SubscriptionConfiguration: $(sub-config-gov-test-resources) - ArmTemplateParameters: $(azureUSGovernmentArmParameters) - Python_37_Windows (AzureUSGovernment): - PythonVersion: '3.7' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-gov-test-resources) - ArmTemplateParameters: $(azureUSGovernmentArmParameters) - Python_38_Linux (AzureChinaCloud): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-cn-test-resources) - Location: 'chinanorth' - ArmTemplateParameters: $(azureChinaCloudArmParameters) - Python_37_Windows (AzureChinaCloud): - PythonVersion: '3.7' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-cn-test-resources) - Location: 'chinanorth' - ArmTemplateParameters: $(azureChinaCloudArmParameters) - + ${{ if eq(parameters.Daily, false) }}: + matrix: + Python_27_Linux (AzureCloud): + PythonVersion: '2.7' + SkipAsyncInstall: true + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_37_Linux (AzureCloud): + PythonVersion: '3.7' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Linux (AzureCloud): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Linux (AzureCloud Canary): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) + ArmTemplateParameters: $(azureCloudArmParameters) + Location: 'eastus2euap' + Python_37_Windows (AzureCloud): + PythonVersion: '3.7' + Pool: "azsdk-pool-mms-win-2019-general" + OSVmImage: "MMS2019" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Windows (AzureCloud): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_37_Mac (AzureCloud): + PythonVersion: '3.7' + Pool: Azure Pipelines + OSVmImage: macOS-10.15 + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Mac (AzureCloud): + PythonVersion: '3.8' + Pool: Azure Pipelines + OSVmImage: macOS-10.15 + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Linux (AzureUSGovernment): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu120.04" + SubscriptionConfiguration: $(sub-config-gov-test-resources) + ArmTemplateParameters: $(azureUSGovernmentArmParameters) + Python_37_Windows (AzureUSGovernment): + PythonVersion: '3.7' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-gov-test-resources) + ArmTemplateParameters: $(azureUSGovernmentArmParameters) + Python_38_Linux (AzureChinaCloud): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-cn-test-resources) + Location: 'chinanorth' + ArmTemplateParameters: $(azureChinaCloudArmParameters) + Python_37_Windows (AzureChinaCloud): + PythonVersion: '3.7' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-cn-test-resources) + Location: 'chinanorth' + ArmTemplateParameters: $(azureChinaCloudArmParameters) + ${{ if eq(parameters.Daily, true) }}: + matrix: + Python_38_Linux (AzureCloud): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) pool: name: $(Pool) vmImage: $(OSVmImage) From ab943a958ae9c825e8ad1e986dd259bc6da318e8 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Aug 2021 16:04:37 -0700 Subject: [PATCH 13/26] Smoke test isolation - differentiating nightly build with other builds --- eng/pipelines/templates/jobs/smoke.tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index caf2578af396..d0354ee7e0c9 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -38,7 +38,7 @@ jobs: dependsOn: smoke_test_eligibility condition: and(succeeded(), eq(dependencies.smoke_test_eligibility.outputs['output_eligibility.RunSmokeTests'], true)) strategy: - ${{ if eq(parameters.Daily, false) }}: + ${{ if eq(parameters.Daily, true) }}: matrix: Python_27_Linux (AzureCloud): PythonVersion: '2.7' @@ -116,7 +116,7 @@ jobs: SubscriptionConfiguration: $(sub-config-cn-test-resources) Location: 'chinanorth' ArmTemplateParameters: $(azureChinaCloudArmParameters) - ${{ if eq(parameters.Daily, true) }}: + ${{ if eq(parameters.Daily, false) }}: matrix: Python_38_Linux (AzureCloud): PythonVersion: '3.8' From 1c5f364b642497f40dca8a4d4840bd7ae4574a52 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 11:19:36 -0700 Subject: [PATCH 14/26] Smoke test isolation per package --- .../templates/stages/archetype-python-release.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 622ea69bf038..6ff1e43ffe70 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -222,16 +222,13 @@ stages: PRTitle: "Increment version for ${{ parameters.ServiceDirectory }} releases" PRLabels: "auto-merge" CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' + - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: + - displayname: Smoke Test Release Package + template: /eng/pipelines/templates/jobs/smoke.tests.yml + parameters: + Daily: false + ArtifactName: ${{artifact.name}} - - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: - - stage: SmokeTest_Release_Packages - displayName: Smoke Test Release Packages - jobs: - - template: /eng/pipelines/templates/jobs/smoke.tests.yml - parameters: - Daily: false - ArtifactName: ${{ parameters.ArtifactName }} - Artifacts: ${{ parameters.Artifacts }} - stage: Integration dependsOn: ${{parameters.DependsOn}} From f61cbd05c52073f081a6c96fbc4e80f32df7b5e5 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 11:27:49 -0700 Subject: [PATCH 15/26] Smoke test isolation - remove unnecessary params --- eng/pipelines/templates/stages/archetype-python-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 6ff1e43ffe70..2b1b5de52862 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -223,8 +223,7 @@ stages: PRLabels: "auto-merge" CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: - - displayname: Smoke Test Release Package - template: /eng/pipelines/templates/jobs/smoke.tests.yml + - template: /eng/pipelines/templates/jobs/smoke.tests.yml parameters: Daily: false ArtifactName: ${{artifact.name}} From 8975171d3819a8f571515a9b545493e5037b169e Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 15:27:36 -0700 Subject: [PATCH 16/26] Passing in single artifact for smoke test --- eng/pipelines/templates/jobs/smoke.tests.yml | 23 +++++++++---------- .../stages/archetype-python-release.yml | 1 + 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index 5b762eeb3ad1..af874a084fd6 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -1,9 +1,9 @@ parameters: - name: Daily default: true - - name: Artifacts + - name: Artifact type: object - default: [] + default: {} - name: ArtifactName type: string default: "not-specified" @@ -16,16 +16,15 @@ jobs: name: "azsdk-pool-mms-ubuntu-2004-general" vmImage: "MMSUbuntu20.04" steps: - - ${{ each artifact in parameters.Artifacts }}: - - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: - - pwsh: | - $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt - if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { - Write-Host "Smoke tests will run for ${{ artifact.name }}" - Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" - } - name: check_smoke_tests_${{ artifact.safeName }} - displayName: Check smoke test eligibility for ${{ artifact.name }} + - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: + - pwsh: | + $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt + if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { + Write-Host "Smoke tests will run for ${{ artifact.name }}" + Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" + } + name: check_smoke_tests_${{ artifact.safeName }} + displayName: Check smoke test eligibility for ${{ artifact.name }} - pwsh: | Write-Host "Setting RunSmokeTests to $($env:RunSmokeTests)" diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 2b1b5de52862..66a0a6e0af9b 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -227,6 +227,7 @@ stages: parameters: Daily: false ArtifactName: ${{artifact.name}} + Artifact: ${{artifact}} - stage: Integration From 42b4057bb9bff99879cfa0aabda5237a1a5a9632 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 15:32:17 -0700 Subject: [PATCH 17/26] Passing in single artifact for smoke test --- eng/pipelines/templates/jobs/smoke.tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index af874a084fd6..a0e82966524b 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -16,15 +16,15 @@ jobs: name: "azsdk-pool-mms-ubuntu-2004-general" vmImage: "MMSUbuntu20.04" steps: - - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: + - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(parameters.Artifact.skipPublishPackage, 'true')) }}: - pwsh: | $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt - if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { - Write-Host "Smoke tests will run for ${{ artifact.name }}" + if ($packages | Where-Object { $_ -match "${{ replace(parameters.Artifact.name, '_', '-') }}" }) { + Write-Host "Smoke tests will run for ${{ parameters.Artifact.name }}" Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" } - name: check_smoke_tests_${{ artifact.safeName }} - displayName: Check smoke test eligibility for ${{ artifact.name }} + name: check_smoke_tests_${{ parameters.Artifact.safeName }} + displayName: Check smoke test eligibility for ${{ parameters.Artifact.name }} - pwsh: | Write-Host "Setting RunSmokeTests to $($env:RunSmokeTests)" From b28a57d46fdc2ad0b3067f9be05dc7ed660348de Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Aug 2021 10:46:29 -0700 Subject: [PATCH 18/26] Temporarily adding azure-template in requirements-release --- common/smoketest/requirements-release.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/smoketest/requirements-release.txt b/common/smoketest/requirements-release.txt index f32ec3483233..f6d480b38170 100644 --- a/common/smoketest/requirements-release.txt +++ b/common/smoketest/requirements-release.txt @@ -6,3 +6,4 @@ azure-keyvault-certificates>=0.0.0b1 azure-keyvault-keys>=0.0.0b1 azure-keyvault-secrets>=0.0.0b1 azure-storage-blob>=0.0.0b1 +azure-template>=0.0.0b1 \ No newline at end of file From 1e644c23213a62226519b64f940bf1b99220522a Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Aug 2021 13:36:35 -0700 Subject: [PATCH 19/26] Smoke test isolation - ArtifactName fix --- eng/pipelines/templates/stages/archetype-python-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 66a0a6e0af9b..97fcc664f43a 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -226,7 +226,7 @@ stages: - template: /eng/pipelines/templates/jobs/smoke.tests.yml parameters: Daily: false - ArtifactName: ${{artifact.name}} + ArtifactName: ${{parameters.ArtifactName}} Artifact: ${{artifact}} From 057ec908d31bf33291ce9c2a485f90eccc0aab33 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Aug 2021 15:11:01 -0700 Subject: [PATCH 20/26] Smoke test isolation - trimming down env matrix --- eng/pipelines/templates/jobs/smoke.tests.yml | 164 ++++++++++--------- 1 file changed, 86 insertions(+), 78 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index a0e82966524b..caf2578af396 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -38,84 +38,92 @@ jobs: dependsOn: smoke_test_eligibility condition: and(succeeded(), eq(dependencies.smoke_test_eligibility.outputs['output_eligibility.RunSmokeTests'], true)) strategy: - matrix: - Python_27_Linux (AzureCloud): - PythonVersion: '2.7' - SkipAsyncInstall: true - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_37_Linux (AzureCloud): - PythonVersion: '3.7' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Linux (AzureCloud): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Linux (AzureCloud Canary): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) - ArmTemplateParameters: $(azureCloudArmParameters) - Location: 'eastus2euap' - Python_37_Windows (AzureCloud): - PythonVersion: '3.7' - Pool: "azsdk-pool-mms-win-2019-general" - OSVmImage: "MMS2019" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Windows (AzureCloud): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_37_Mac (AzureCloud): - PythonVersion: '3.7' - Pool: Azure Pipelines - OSVmImage: macOS-10.15 - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Mac (AzureCloud): - PythonVersion: '3.8' - Pool: Azure Pipelines - OSVmImage: macOS-10.15 - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Linux (AzureUSGovernment): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu120.04" - SubscriptionConfiguration: $(sub-config-gov-test-resources) - ArmTemplateParameters: $(azureUSGovernmentArmParameters) - Python_37_Windows (AzureUSGovernment): - PythonVersion: '3.7' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-gov-test-resources) - ArmTemplateParameters: $(azureUSGovernmentArmParameters) - Python_38_Linux (AzureChinaCloud): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-cn-test-resources) - Location: 'chinanorth' - ArmTemplateParameters: $(azureChinaCloudArmParameters) - Python_37_Windows (AzureChinaCloud): - PythonVersion: '3.7' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-cn-test-resources) - Location: 'chinanorth' - ArmTemplateParameters: $(azureChinaCloudArmParameters) - + ${{ if eq(parameters.Daily, false) }}: + matrix: + Python_27_Linux (AzureCloud): + PythonVersion: '2.7' + SkipAsyncInstall: true + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_37_Linux (AzureCloud): + PythonVersion: '3.7' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Linux (AzureCloud): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Linux (AzureCloud Canary): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) + ArmTemplateParameters: $(azureCloudArmParameters) + Location: 'eastus2euap' + Python_37_Windows (AzureCloud): + PythonVersion: '3.7' + Pool: "azsdk-pool-mms-win-2019-general" + OSVmImage: "MMS2019" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Windows (AzureCloud): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_37_Mac (AzureCloud): + PythonVersion: '3.7' + Pool: Azure Pipelines + OSVmImage: macOS-10.15 + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Mac (AzureCloud): + PythonVersion: '3.8' + Pool: Azure Pipelines + OSVmImage: macOS-10.15 + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + Python_38_Linux (AzureUSGovernment): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu120.04" + SubscriptionConfiguration: $(sub-config-gov-test-resources) + ArmTemplateParameters: $(azureUSGovernmentArmParameters) + Python_37_Windows (AzureUSGovernment): + PythonVersion: '3.7' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-gov-test-resources) + ArmTemplateParameters: $(azureUSGovernmentArmParameters) + Python_38_Linux (AzureChinaCloud): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-cn-test-resources) + Location: 'chinanorth' + ArmTemplateParameters: $(azureChinaCloudArmParameters) + Python_37_Windows (AzureChinaCloud): + PythonVersion: '3.7' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-cn-test-resources) + Location: 'chinanorth' + ArmTemplateParameters: $(azureChinaCloudArmParameters) + ${{ if eq(parameters.Daily, true) }}: + matrix: + Python_38_Linux (AzureCloud): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) pool: name: $(Pool) vmImage: $(OSVmImage) From 6e4e083525b18df5e096cfc8f467ddaff91ad52f Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Wed, 11 Aug 2021 16:04:37 -0700 Subject: [PATCH 21/26] Smoke test isolation - differentiating nightly build with other builds --- eng/pipelines/templates/jobs/smoke.tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index caf2578af396..d0354ee7e0c9 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -38,7 +38,7 @@ jobs: dependsOn: smoke_test_eligibility condition: and(succeeded(), eq(dependencies.smoke_test_eligibility.outputs['output_eligibility.RunSmokeTests'], true)) strategy: - ${{ if eq(parameters.Daily, false) }}: + ${{ if eq(parameters.Daily, true) }}: matrix: Python_27_Linux (AzureCloud): PythonVersion: '2.7' @@ -116,7 +116,7 @@ jobs: SubscriptionConfiguration: $(sub-config-cn-test-resources) Location: 'chinanorth' ArmTemplateParameters: $(azureChinaCloudArmParameters) - ${{ if eq(parameters.Daily, true) }}: + ${{ if eq(parameters.Daily, false) }}: matrix: Python_38_Linux (AzureCloud): PythonVersion: '3.8' From c572f51cb09384bc0c4ba34f43a733291b263b26 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 15:27:36 -0700 Subject: [PATCH 22/26] Smoke test isolation --- eng/pipelines/templates/jobs/smoke.tests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index d0354ee7e0c9..dfc0b1eb1cd1 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -16,6 +16,7 @@ jobs: name: "azsdk-pool-mms-ubuntu-2004-general" vmImage: "MMSUbuntu20.04" steps: +<<<<<<< HEAD - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(parameters.Artifact.skipPublishPackage, 'true')) }}: - pwsh: | $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt @@ -25,6 +26,17 @@ jobs: } name: check_smoke_tests_${{ parameters.Artifact.safeName }} displayName: Check smoke test eligibility for ${{ parameters.Artifact.name }} +======= + - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: + - pwsh: | + $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt + if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { + Write-Host "Smoke tests will run for ${{ artifact.name }}" + Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" + } + name: check_smoke_tests_${{ artifact.safeName }} + displayName: Check smoke test eligibility for ${{ artifact.name }} +>>>>>>> 26b0d3d9fc (Passing in single artifact for smoke test) - pwsh: | Write-Host "Setting RunSmokeTests to $($env:RunSmokeTests)" From 8ad2b07a5d7daa2ca846d42246dbdc06755d5f89 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 10 Aug 2021 15:32:17 -0700 Subject: [PATCH 23/26] Smoke test isolation --- eng/pipelines/templates/jobs/smoke.tests.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index dfc0b1eb1cd1..9727954176b1 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -16,8 +16,6 @@ jobs: name: "azsdk-pool-mms-ubuntu-2004-general" vmImage: "MMSUbuntu20.04" steps: -<<<<<<< HEAD - - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(parameters.Artifact.skipPublishPackage, 'true')) }}: - pwsh: | $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt if ($packages | Where-Object { $_ -match "${{ replace(parameters.Artifact.name, '_', '-') }}" }) { @@ -26,17 +24,6 @@ jobs: } name: check_smoke_tests_${{ parameters.Artifact.safeName }} displayName: Check smoke test eligibility for ${{ parameters.Artifact.name }} -======= - - ${{ if and(ne(variables['Skip.Release'], 'true'), ne(artifact.skipPublishPackage, 'true')) }}: - - pwsh: | - $packages = Get-Content $(Build.SourcesDirectory)/common/smoketest/requirements-release.txt - if ($packages | Where-Object { $_ -match "${{ replace(artifact.name, '_', '-') }}" }) { - Write-Host "Smoke tests will run for ${{ artifact.name }}" - Write-Host "##vso[task.setvariable variable=RunSmokeTests;]true" - } - name: check_smoke_tests_${{ artifact.safeName }} - displayName: Check smoke test eligibility for ${{ artifact.name }} ->>>>>>> 26b0d3d9fc (Passing in single artifact for smoke test) - pwsh: | Write-Host "Setting RunSmokeTests to $($env:RunSmokeTests)" From bfb7c22045261cc836216d72475158c6f0158b43 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 12 Aug 2021 11:03:27 -0700 Subject: [PATCH 24/26] Adding displayName for smoke test --- eng/pipelines/templates/jobs/smoke.tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index d0354ee7e0c9..a1daba87b721 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -33,7 +33,8 @@ jobs: env: RunSmokeTests: $(RunSmokeTests) - - job: + - job: run_smoke_test + displayName: Run Smoke Test ${{ if eq(parameters.Daily, false) }}: dependsOn: smoke_test_eligibility condition: and(succeeded(), eq(dependencies.smoke_test_eligibility.outputs['output_eligibility.RunSmokeTests'], true)) From 43740338c2cedac4c37e702857467bb7a249a4e4 Mon Sep 17 00:00:00 2001 From: ckairen <38804567+ckairen@users.noreply.github.com> Date: Thu, 12 Aug 2021 12:40:38 -0700 Subject: [PATCH 25/26] Update eng/pipelines/templates/stages/archetype-python-release.yml Co-authored-by: Ben Broderick Phillips --- eng/pipelines/templates/stages/archetype-python-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 97fcc664f43a..b85ae44ca7bf 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -226,8 +226,8 @@ stages: - template: /eng/pipelines/templates/jobs/smoke.tests.yml parameters: Daily: false - ArtifactName: ${{parameters.ArtifactName}} - Artifact: ${{artifact}} + ArtifactName: ${{ parameters.ArtifactName }} + Artifact: ${{ artifact }} - stage: Integration From 8da40059f21cc414cd82e7eb49aef887ffc76cc9 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 12 Aug 2021 12:59:43 -0700 Subject: [PATCH 26/26] Resolve PR suggestions --- common/smoketest/requirements-release.txt | 1 + eng/pipelines/templates/jobs/smoke.tests.yml | 25 +++++++------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/common/smoketest/requirements-release.txt b/common/smoketest/requirements-release.txt index f6d480b38170..6e2fb4d76eb0 100644 --- a/common/smoketest/requirements-release.txt +++ b/common/smoketest/requirements-release.txt @@ -6,4 +6,5 @@ azure-keyvault-certificates>=0.0.0b1 azure-keyvault-keys>=0.0.0b1 azure-keyvault-secrets>=0.0.0b1 azure-storage-blob>=0.0.0b1 +# Required for template release to trigger smoke tests azure-template>=0.0.0b1 \ No newline at end of file diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index a1daba87b721..8b68a151ff57 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -39,8 +39,14 @@ jobs: dependsOn: smoke_test_eligibility condition: and(succeeded(), eq(dependencies.smoke_test_eligibility.outputs['output_eligibility.RunSmokeTests'], true)) strategy: - ${{ if eq(parameters.Daily, true) }}: - matrix: + matrix: + Python_38_Linux (AzureCloud): + PythonVersion: '3.8' + Pool: "azsdk-pool-mms-ubuntu-2004-general" + OSVmImage: "MMSUbuntu20.04" + SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) + ArmTemplateParameters: $(azureCloudArmParameters) + ${{ if eq(parameters.Daily, true) }}: Python_27_Linux (AzureCloud): PythonVersion: '2.7' SkipAsyncInstall: true @@ -54,12 +60,6 @@ jobs: OSVmImage: "MMSUbuntu20.04" SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) ArmTemplateParameters: $(azureCloudArmParameters) - Python_38_Linux (AzureCloud): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) Python_38_Linux (AzureCloud Canary): PythonVersion: '3.8' Pool: "azsdk-pool-mms-ubuntu-2004-general" @@ -117,14 +117,7 @@ jobs: SubscriptionConfiguration: $(sub-config-cn-test-resources) Location: 'chinanorth' ArmTemplateParameters: $(azureChinaCloudArmParameters) - ${{ if eq(parameters.Daily, false) }}: - matrix: - Python_38_Linux (AzureCloud): - PythonVersion: '3.8' - Pool: "azsdk-pool-mms-ubuntu-2004-general" - OSVmImage: "MMSUbuntu20.04" - SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) - ArmTemplateParameters: $(azureCloudArmParameters) + pool: name: $(Pool) vmImage: $(OSVmImage)