From 9e7862ea88afa9d656a10c9a62ca18814af30c89 Mon Sep 17 00:00:00 2001 From: Sanju Yadav Date: Wed, 20 May 2026 14:42:46 +0530 Subject: [PATCH] package feed updates --- .npmrc | 3 ++- ci/check-powershell-syntax.ps1 | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.npmrc b/.npmrc index 969ccea07661..c4412d22eca2 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,4 @@ registry=https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/PipelineTools_PublicPackages/npm/registry/ -always-auth=true \ No newline at end of file +always-auth=true +audit=false \ No newline at end of file diff --git a/ci/check-powershell-syntax.ps1 b/ci/check-powershell-syntax.ps1 index 832534a4a93e..9d341f03760c 100644 --- a/ci/check-powershell-syntax.ps1 +++ b/ci/check-powershell-syntax.ps1 @@ -1,6 +1,14 @@ # Description: Checks the PowerShell syntax of the script using PSScriptAnalyzer. param([String]$pathToBuiltTasks) +$internalFeedUrl = "https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/powershell-modules/nuget/v2" +$internalRepoName = "AzDO-PSModules" + +# Register internal Azure Artifacts feed as PS repository (avoids external network calls to PSGallery) +if (-Not (Get-PSRepository -Name $internalRepoName -ErrorAction SilentlyContinue)) { + Register-PSRepository -Name $internalRepoName -SourceLocation $internalFeedUrl -InstallationPolicy Trusted +} + function Get-AnalyzerSettings() { return @{ Severity=@('Error', 'Warning', 'Information', 'ParseError', 'ParseWarning') @@ -37,7 +45,7 @@ function Invoke-AnalyzerToTask() { $module = Get-Module -Name "PSScriptAnalyzer"; if ($module -eq $null) { Write-Host "Installing PSScriptAnalyzer module..." - Install-Module -Name "PSScriptAnalyzer" -Scope CurrentUser -Force + Install-Module -Name "PSScriptAnalyzer" -Scope CurrentUser -Force -Repository $internalRepoName } Write-Host "Running PSScriptAnalyzer for $taskPath." @@ -106,7 +114,7 @@ function main() { $module = Get-Module -Name "Newtonsoft.Json"; if ($module -eq $null) { Write-Host "Installing Newtonsoft.Json module..." - Install-Module -Scope CurrentUser -Name "Newtonsoft.Json" -Force + Install-Module -Scope CurrentUser -Name "Newtonsoft.Json" -Force -Repository $internalRepoName } # Get the tasks which have a PowerShell handler.