Skip to content
Draft
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
3 changes: 2 additions & 1 deletion eng/common/pipelines/templates/steps/run-pester-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ parameters:
steps:

- pwsh: |
Install-Module -Name Pester -Force
. (Join-Path "$(Build.SourcesDirectory)" eng common scripts Helpers PSModule-Helpers.ps1)
Install-ModuleIfNotInstalled "Pester" "5.7.1" | Import-Module
displayName: Install Pester

# default test steps
Expand Down
13 changes: 6 additions & 7 deletions eng/common/scripts/Helpers/PSModule-Helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,16 @@ function Update-PSModulePathForCI() {
}

function Get-ModuleRepositories([string]$moduleName) {
$DefaultPSRepositoryUrl = "https://www.powershellgallery.com/api/v2"
# List of modules+versions we want to replace with internal feed sources for reliability, security, etc.
$packageFeedOverrides = @{
'powershell-yaml' = 'https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-tools/nuget/v2'
}
$InternalPSRepositoryUrl = "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-tools/nuget/v2"
Copy link
Copy Markdown
Member Author

@raych1 raych1 Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weshaggard do we want to make this change to install powershell module from CFS? If so, we need to publish Az and Pester modules to the internal feed. They're missing from https://dev.azure.com/azure-sdk/public/_artifacts/feed/azure-sdk-tools

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please try adding the powershell gallery as an upstream to the feed and then use the tools feed to pull them through.

# All modules should be installed from the internal feed.
# Add module-specific overrides here if a module requires a different internal feed.
$packageFeedOverrides = @{}

$repoUrls = if ($packageFeedOverrides.Contains("${moduleName}")) {
@($packageFeedOverrides["${moduleName}"], $DefaultPSRepositoryUrl)
@($packageFeedOverrides["${moduleName}"])
}
else {
@($DefaultPSRepositoryUrl)
@($InternalPSRepositoryUrl)
}

return $repoUrls
Expand Down
3 changes: 2 additions & 1 deletion eng/common/scripts/Verify-Resource-Ref.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
. (Join-Path $PSScriptRoot common.ps1)
Install-Module -Name powershell-yaml -RequiredVersion 0.4.7 -Force -Scope CurrentUser
. (Join-Path $PSScriptRoot Helpers PSModule-Helpers.ps1)
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module
$ymlfiles = Get-ChildItem $RepoRoot -recurse | Where-Object {$_ -like '*.yml'}
$affectedRepos = [System.Collections.ArrayList]::new()

Expand Down
2 changes: 1 addition & 1 deletion eng/scripts/Update-Artifacts-List-For-Patch-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (!(Test-Path $SourcesDirectory -PathType Container)) {
exit 1
}

Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module

$artifactsDict = [ordered]@{}
$addModulesDict = [ordered]@{}
Expand Down
2 changes: 1 addition & 1 deletion eng/versioning/pom_file_version_scanner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if ($UseVerboseLogging) {
Write-Host "SdkRoot=$SdkRoot"
}

Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module

$StartTime = $(get-date)

Expand Down
Loading