Skip to content

Commit

Permalink
Fixing nightly run smoke test (#17791)
Browse files Browse the repository at this point in the history
* Fixing nightly run smoke test

* PR mod

* condition modification

* pr-mod
  • Loading branch information
ckairen authored Sep 27, 2021
1 parent 19913b9 commit e4408ed
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 23 deletions.
36 changes: 16 additions & 20 deletions eng/pipelines/templates/jobs/smoke.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')) }}:
Expand Down Expand Up @@ -131,27 +131,14 @@ jobs:

- download: current
artifact: ${{parameters.ArtifactName}}
condition: and(succeeded(), ne('${{ parameters.Daily }}', 'true'))
- pwsh: |
$(Build.SourcesDirectory)/eng/common/scripts/Import-AzModules.ps1
$subscriptionConfiguration = @"
$(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 `
Expand All @@ -161,23 +148,32 @@ 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)
}
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
Expand Down
6 changes: 5 additions & 1 deletion sdk/appconfiguration/app-configuration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
5 changes: 4 additions & 1 deletion sdk/communication/communication-sms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@
],
"requiredResources": {
"Azure Communication Services account": "https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource"
}
},
"skip": [
"sendSmsWithOptions.js"
]
}
}
3 changes: 2 additions & 1 deletion sdk/search/search-documents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
],
"requiredResources": {
"Azure Search Documents instance": "https://docs.microsoft.com/azure/search/search-create-service-portal"
}
},
"skipFolder": true
}
}

0 comments on commit e4408ed

Please sign in to comment.