From e4408ed30ff9516323ab0059638b25ca2189a639 Mon Sep 17 00:00:00 2001 From: ckairen <38804567+ckairen@users.noreply.github.com> Date: Mon, 27 Sep 2021 14:32:09 -0700 Subject: [PATCH] Fixing nightly run smoke test (#17791) * Fixing nightly run smoke test * PR mod * condition modification * pr-mod --- eng/pipelines/templates/jobs/smoke.tests.yml | 36 +++++++++---------- .../app-configuration/package.json | 6 +++- .../communication-sms/package.json | 5 ++- sdk/search/search-documents/package.json | 3 +- 4 files changed, 27 insertions(+), 23 deletions(-) diff --git a/eng/pipelines/templates/jobs/smoke.tests.yml b/eng/pipelines/templates/jobs/smoke.tests.yml index 7d2a390d4200..44e4a42788cb 100644 --- a/eng/pipelines/templates/jobs/smoke.tests.yml +++ b/eng/pipelines/templates/jobs/smoke.tests.yml @@ -10,7 +10,7 @@ parameters: default: {} - name: ArtifactName type: string - default: "" + default: 'not-specified' jobs: - ${{ if and(eq(parameters.Daily, false), ne(variables['Skip.Release'], 'true')) }}: @@ -131,6 +131,7 @@ jobs: - download: current artifact: ${{parameters.ArtifactName}} + condition: and(succeeded(), ne('${{ parameters.Daily }}', 'true')) - pwsh: | $(Build.SourcesDirectory)/eng/common/scripts/Import-AzModules.ps1 @@ -138,20 +139,6 @@ jobs: $(SubscriptionConfiguration) "@ | ConvertFrom-Json -AsHashtable; - $packageOverrides = @() - $packageOverrides += (dir env: | Where-Object { $_.Name.StartsWith("SMOKE_PACKAGE_") }).Value - - $packageArtifact = Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{parameters.Artifact.name}}/*.tgz - if ($packageArtifact.name -notmatch "${{parameters.Artifact.name}}") { - Write-Error "Package name mismatch: expecting ${{parameters.Artifact.name}}, found $packageArtifact.name" - exit 1 - } - if ($packageArtifact.count -ne 1) { - Write-Error "Got $packageArtifact.count packages, expecting 1." - exit 1 - } - $result = $(System.DefaultWorkingDirectory)/eng/scripts/get-npm-tags.ps1 -packageArtifact $packageArtifact -workingDirectory $(System.DefaultWorkingDirectory)/temp - if ([System.Convert]::ToBoolean("${{ parameters.Daily }}")) { ./Initialize-SmokeTests.ps1 ` -CI ` @@ -161,12 +148,25 @@ jobs: @subscriptionConfiguration ` -AdditionalParameters $(ArmTemplateParameters) } else { + $packageArtifact = Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{parameters.Artifact.name}}/*.tgz + if ($packageArtifact.name -notmatch "${{parameters.Artifact.name}}") { + Write-Error "Package name mismatch: expecting ${{parameters.Artifact.name}}, found $packageArtifact.name" + exit 1 + } + if ($packageArtifact.count -ne 1) { + Write-Error "Got $packageArtifact.count packages, expecting 1." + exit 1 + } + $result = $(System.DefaultWorkingDirectory)/eng/scripts/get-npm-tags.ps1 -packageArtifact $packageArtifact -workingDirectory $(System.DefaultWorkingDirectory)/temp + $packageInfo = Get-Content -Path "$(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo/${{parameters.Artifact.name}}.json" + | ConvertFrom-Json -AsHashtable + ./Initialize-SmokeTests.ps1 ` -CI ` -Verbose ` -Location '$(Location)' ` -TagOverride $result.Tag ` - -TagOverridePackages $packageOverrides ` + -TagOverridePackages $packageInfo.Name ` -ServiceDirectory ${{ parameters.ServiceDirectory }} ` @subscriptionConfiguration ` -AdditionalParameters $(ArmTemplateParameters) @@ -174,10 +174,6 @@ jobs: workingDirectory: $(Build.SourcesDirectory)/common/smoke-test displayName: Deploy Smoke Test resources and prepare samples - env: - # Pipelines yaml does not handle transferring non-string parameter types - # into script blocks very well, so this is the best available workaround. - SMOKE_PACKAGE_${{ parameters.Artifact.safeName }}: "@azure/${{ replace(parameters.Artifact.name, 'azure-', '') }}" - pwsh: Get-Content ./run-manifest.json workingDirectory: $(Build.SourcesDirectory)/common/smoke-test diff --git a/sdk/appconfiguration/app-configuration/package.json b/sdk/appconfiguration/app-configuration/package.json index ca46c6e28a8e..419e8714ec82 100644 --- a/sdk/appconfiguration/app-configuration/package.json +++ b/sdk/appconfiguration/app-configuration/package.json @@ -151,6 +151,10 @@ ], "requiredResources": { "Azure App Configuration account": "https://docs.microsoft.com/azure/azure-app-configuration/quickstart-aspnet-core-app?tabs=core5x#create-an-app-configuration-store" - } + }, + "skip": [ + "featureFlag.js", + "secretReference.js" + ] } } diff --git a/sdk/communication/communication-sms/package.json b/sdk/communication/communication-sms/package.json index 7b974b47e4bb..0d30f33cc836 100644 --- a/sdk/communication/communication-sms/package.json +++ b/sdk/communication/communication-sms/package.json @@ -145,6 +145,9 @@ ], "requiredResources": { "Azure Communication Services account": "https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource" - } + }, + "skip": [ + "sendSmsWithOptions.js" + ] } } diff --git a/sdk/search/search-documents/package.json b/sdk/search/search-documents/package.json index 72b8b96e4ae2..595149792d57 100644 --- a/sdk/search/search-documents/package.json +++ b/sdk/search/search-documents/package.json @@ -140,6 +140,7 @@ ], "requiredResources": { "Azure Search Documents instance": "https://docs.microsoft.com/azure/search/search-create-service-portal" - } + }, + "skipFolder": true } }