Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 0 additions & 7 deletions .azure-pipelines/util/smoke-test-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ jobs:
Write-Host "List artifacts..."
Get-ChildItem "$(Pipeline.Workspace)\\LocalRepo\\"

- task: NuGetCommand@2
condition: and(succeeded(), eq('${{ parameters.psVersion }}', '5.1.14'))
displayName: 'Download ThreadJob .nupkg File for PowerShell 5.1.14'
inputs:
command: custom
arguments: 'install ThreadJob -directdownload -packagesavemode nupkg -source https://www.powershellgallery.com/api/v2 -OutputDirectory packages'

- task: NuGetCommand@2
condition: and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'))
displayName: 'Download Previous Az .nupkg Files'
Expand Down
9 changes: 1 addition & 8 deletions tools/Test/SmokeTest/InstallAzModules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ Register-Gallery $gallery $localRepoLocation

Write-Host "Installing Az..."
Install-Module -Name Az -Repository $gallery -Scope CurrentUser -AllowClobber -Force

$file = Get-ChildItem $localRepoLocation | Where-Object {$_.Name -like "ThreadJob*"}
$installedModule = Get-Module -ListAVailable -Name ThreadJob
if ($file -ne $null -and $installedModule -eq $null) {
Write-Host "Install ThreadJob..."
Install-Module -Name ThreadJob -Repository $gallery -Scope CurrentUser -AllowClobber -Force
}

# Check version
Import-Module -MinimumVersion '2.6.0' -Name 'Az' -Force
Expand All @@ -61,4 +54,4 @@ Get-Module -Name Az.* -ListAvailable

if (!$azVersion) {
throw "No Az is installed"
}
}
16 changes: 16 additions & 0 deletions tools/Test/SmokeTest/PrepareRequiredPowershell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ function Install-PowerShell {
dotnet tool run pwsh -c $command
}
}

#Install ThreadJob for Windows PowerShell
if ($requiredPsVersion -eq $windowsPowershellVersion) {
Write-Host "Install ThreadJob for Windows PowerShell."
$installedModule = Get-Module -ListAVailable -Name ThreadJob
if ($installedModule -eq $null) {
try {
Install-Module -Name ThreadJob -Repository PSGallery -Scope CurrentUser -AllowClobber -Force
Write-Host "Install ThreadJob successfully."
}
catch {
Write-Host "Fail to install ThreadJob from PSGallery."
Write-Host $_
}
}
}
}

# Image "macOS-10.15" preinstalled Az modules
Expand Down