Skip to content

Commit 7c5308c

Browse files
author
Sanju Yadav
committed
package feed updates
1 parent 1a7da16 commit 7c5308c

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
registry=https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/PipelineTools_PublicPackages/npm/registry/
22

3-
always-auth=true
3+
always-auth=true
4+
audit=false

ci/check-powershell-syntax.ps1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Description: Checks the PowerShell syntax of the script using PSScriptAnalyzer.
22
param([String]$pathToBuiltTasks)
33

4+
$internalFeedUrl = "https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/powershell-modules/nuget/v2"
5+
$internalRepoName = "AzDO-PSModules"
6+
7+
# Register internal Azure Artifacts feed as PS repository (avoids external network calls to PSGallery)
8+
if (-Not (Get-PSRepository -Name $internalRepoName -ErrorAction SilentlyContinue)) {
9+
Register-PSRepository -Name $internalRepoName -SourceLocation $internalFeedUrl -InstallationPolicy Trusted
10+
}
11+
412
function Get-AnalyzerSettings() {
513
return @{
614
Severity=@('Error', 'Warning', 'Information', 'ParseError', 'ParseWarning')
@@ -37,7 +45,7 @@ function Invoke-AnalyzerToTask() {
3745
$module = Get-Module -Name "PSScriptAnalyzer";
3846
if ($module -eq $null) {
3947
Write-Host "Installing PSScriptAnalyzer module..."
40-
Install-Module -Name "PSScriptAnalyzer" -Scope CurrentUser -Force
48+
Install-Module -Name "PSScriptAnalyzer" -Scope CurrentUser -Force -Repository $internalRepoName
4149
}
4250

4351
Write-Host "Running PSScriptAnalyzer for $taskPath."
@@ -106,7 +114,7 @@ function main() {
106114
$module = Get-Module -Name "Newtonsoft.Json";
107115
if ($module -eq $null) {
108116
Write-Host "Installing Newtonsoft.Json module..."
109-
Install-Module -Scope CurrentUser -Name "Newtonsoft.Json" -Force
117+
Install-Module -Scope CurrentUser -Name "Newtonsoft.Json" -Force -Repository $internalRepoName
110118
}
111119

112120
# Get the tasks which have a PowerShell handler.

0 commit comments

Comments
 (0)